Sound: Can't Get a Peep out of Lua/Celestia

The place to discuss creating, porting and modifying Celestia's source code.
Topic author
hharris
Posts: 79
Joined: 23.02.2006
With us: 18 years 9 months
Location: Pasadena, CA 91104

Sound: Can't Get a Peep out of Lua/Celestia

Post #1by hharris » 16.01.2007, 23:42

As far as I know, the IO capability of Lua does not include a sound interface. It's not possible to even get a peep out my Mac in Celestia which, like most modern computers, has a very sophisticated voice synthesizer.

Celestia has beautiful graphics, but it's a shame that Lua programmers can't access all that sophisticated hardware for even a trivial sound interface (e. g. beep when an event happens.) Graphics isn't everything you know.

Anybody know of any work being done in this area?

Henry :?

Avatar
fsgregs
Posts: 1307
Joined: 07.10.2002
With us: 22 years 1 month
Location: Manassas, VA

Post #2by fsgregs » 22.01.2007, 01:25

Sound is incorporated into a customized version of Celestia that is available to all. In fact, it is quite sophisticated. Do a search on the forum to find at lease five threads discussing it.

Frank

Topic author
hharris
Posts: 79
Joined: 23.02.2006
With us: 18 years 9 months
Location: Pasadena, CA 91104

Post #3by hharris » 22.01.2007, 01:49

Thanks Frank! I had talked to someone else who told me it was impossible, so I didn't bother to do the obvious. Wow, I'd be happy with a beep, but you're right. Very sophisticated. There goes the last of my free time.

Henry :o

Vincent
Developer
Posts: 1356
Joined: 07.01.2005
With us: 19 years 10 months
Location: Nancy, France

Post #4by Vincent » 22.01.2007, 11:56

Henry,

Sorry, I missed your post. Victor has provided a patch that allows to play sound files during cel/celx scripts. It uses the OpenAL audio library. I've modified this patch and I've included it into the Celestia_1.4.1_patch version that I built several monthes ago. You can have more information about the sound patch and the celestia_patch version in these threads :
http://celestiaproject.net/forum/viewtopic.php?t=8624
http://celestiaproject.net/forum/viewtopic.php?t=9503

However, the sound playback main function is included in the core of Celestia (celestiacore.cpp). I'll investigate soon the possibility to integrate the sound playback function directly in the Lua Code. That's on my todo list for the Lua Edu Tools : http://celestiaproject.net/forum/viewtopic.php?t=10406
@+
Vincent

Celestia Qt4 SVN / Celestia 1.6.1 + Lua Edu Tools v1.2
GeForce 8600 GT 1024MB / AMD Athlon 64 Dual Core / 4Go DDR2 / XP SP3


Return to “Development”