Tuesday, February 19, 2008

SVN r31: Goodbye, AL_EXT_vorbis

Okay. First, a little background. For our sound backend, we're using OpenAL, which is a threaded, cross-platform, cross-driver sound system with optional hardware acceleration and support for 3D effects. Pretty cool, huh?

OpenAL has an extension system similar to OpenGL, and one extension popular in Linux games is AL_EXT_vorbis, which adds Vorbis stream support to OpenAL. The mechanism is through a callback system which essentially takes care of decoding Vorbis streams for us.

Now, up until now, I've detected AL_EXT_vorbis, and I've been debating whether or not to use it. However, after digging into the code originally provided by Loki Games which implements AL_EXT_vorbis, and looking at the parts of Sound Manager which I retooled way back in r17, I decided that the space and time gains from using AL_EXT_vorbis were simply not worth it, so I removed the detection code.

Also, Sound Manager now exclusively uses the LOG_*() macros. While we're not grepping through the code to put them in, they should be fixed whenever possible, because between this:
StateManager::getSingleton()->getDevice()->getVideoDriver()->getLogger(str, irr::ELL_INFORMATION);
And this:
LOG_INFO(str);

Which would you rather have to read?

TODO: Wire up alutInit() to take argc and argv on Linux, without screwing up Win32 WinMain().

~ C.

No comments: