|
|
Log in / Subscribe / Register

OpenAL omitted?

OpenAL omitted?

Posted Sep 25, 2008 17:52 UTC (Thu) by tetromino (guest, #33846)
Parent article: A Guide Through The Linux Sound API Jungle

Where is OpenAL in Lennart's picture? It's the standard way of doing positional audio in modern games for Linux (SDL is only useful for basic 1980s-1990s style games), but Lennart does not mention it at all.


to post comments

OpenAL omitted?

Posted Sep 25, 2008 19:19 UTC (Thu) by drag (guest, #31333) [Link] (3 responses)

> Where is OpenAL in Lennart's picture? It's the standard way of doing positional audio in modern games for Linux (SDL is only useful for basic 1980s-1990s style games), but Lennart does not mention it at all.

I wouldn't look down at SDL audio to much. Quake4 uses it, for example. (I think).

But it's probably worth mentioning.

OpenAL omitted?

Posted Sep 28, 2008 7:53 UTC (Sun) by NinjaSeg (guest, #33460) [Link]

Because John Carmack is more than happy to write his own 3D audio engine from scratch. Because he's hardcore like that...

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...

OpenAL omitted?

Posted Sep 28, 2008 8:01 UTC (Sun) by NinjaSeg (guest, #33460) [Link] (1 responses)

Erk, and actually, Carmack likes reinventing the wheel so much, that none of his game engines have ever used SDL. They use X11 and OSS/ALSA directly. Which off course means they end up getting things like fullscreen wrong. Grrrr... (Synergy fails miserably in Openarena in fullscreen. Also media keys don't work, though I think SDL fails that too last I checked, someday I need to write a patch...)

OpenAL omitted?

Posted Oct 2, 2008 5:37 UTC (Thu) by drag (guest, #31333) [Link]

Ya. I am talking about the very latest stuff. Quake3 and other stuff around that era use this funky mmap thing that grew up out of the Doom DOS era.


Copyright © 2026, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds