"He who lives without folly isn't so wise as he thinks."
- Francois De La Rochefoucauld

Demo updates
Sunday, December 15, 2002 | Permalink

I have updated the Volumetric Fogging demo and replaced the Bass sound library I used before with my own little sound engine based on OpenAL and libvorbis. So now there should be sound in both Windows and Linux. The Linux implementation of OpenAL doesn't feel quite as solid as the Windows version though and I had some trouble getting my code that worked just fine in Windows to work in Linux too. There are a couple of differencies between the implementations (which AFAICS are undocumented), such as that the Windows version grabs the audio data I provide it with and puts it into its own buffer while the Linux version simply is continuously reading the pointer I passed it, which of course causes an immediate crash if I free my buffer. It can also crash under certain other circumstances I couldn't make any sense out of. Such as restarting a source that has stopped playing and at the same time be using a particle system , yeah, it doesn't make sense but that's how it is. I can either turn the particle system off and everything works fine, or I can just skip restarting the audio stream and it'll also work. Anyway, after having tried to figure this out for quite some time I gave up and concluded that the bug isn't mine but rather somewhere in the OpenAL implementation for Linux as everything works just fine in Windows. Hopefully this problem gets solved in future versions of OpenAL. Until then I opted for just letting the demo exit at the end of the loop instead of repeating in Linux, feels good enough for now.

I have also updated the recent Shadows that rocks demo. It should now run both faster and get a little better precision.

Name

Comment

Enter the code below