Page 1 of 1

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

Posted: 16.01.2007, 23:42
by hharris
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 :?

Posted: 22.01.2007, 01:25
by fsgregs
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

Posted: 22.01.2007, 01:49
by hharris
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

Posted: 22.01.2007, 11:56
by Vincent
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