OpenAL omitted?
OpenAL omitted?
Posted Sep 28, 2008 7:53 UTC (Sun) by NinjaSeg (guest, #33460)In reply to: OpenAL omitted? by drag
Parent article: A Guide Through The Linux Sound API Jungle
SDL itself only provides a bare minimum callback API, as it should. Unless you're looking to, or already have, re-invented the wheel, or are doing something special like real-time synthesis, it's not very useful.
The SDL_mixer library provides a more practical API for the needs of a typical game, providing multi-channel mixing, panning, resampling, file loading and decoding and even music streaming/synthesis. It appears to even have some basic positional 3D support.
OpenAL of course provides a full-blown 3D audio solution, and is the only mature open source solution I know of. But it's a bit narrower in scope than something like SDL_mixer, it doesn't really cover stuff like music streaming leaving you to either do some amount of wheel-reinvention, or go outside of OpenAL for that.
If you're not doing positional 3D audio then you'll probably find OpenAL 's API more awkward than necessary. But it comes with recent versions of OSX, and has the backing of Creative Labs on Windows, so it's really the way to go for cross-platform 3D audio. Note that Microsoft killed off hardware Directsound3D in Vista so OpenAL is now the only way to get hardware 3d audio in Vista...
For what it's worth I authored the initial OpenAL patch for the Second Life client, that looks like it might actually get merged soon. It's replacing the closed source "fmod" library it currently uses. SL makes use of the internet music streaming that fmod provides, which is outside the scope of OpenAL, so for that we end up going to gstreamer (on Linux), completely outside of OpenAL. Which means you need to have multiple streams working, any sane distribution should have ALSA+dmix or PulseAudio working out of the box by now...
