Audiere vs OpenAL vs irrKlang

It’s funny to see how our requirements regarding sound support changed. When I started to incorporate sound into DVW (after our former teammate Anselm who wrote the very first audio device left us, that is) I went for Audiere. At that time, Audiere was a framework which fitted exactly our needs. We had a Windows-only game for the time being, were about to play WAV and MP3 files from memory and didn’t want to bother about threading and all the platform-specific audio internals ourselves. It had bindings for several other languages and it looked like lots of other projects were using Audiere. Eventually, even Irrlicht was using it for its demos, so I thought this was a good way to go. But things turned out differently over time.

We started porting DVW to Linux and OS X, starting with Linux. Audiere was available for Linux, but I was waiting for an OS X version to come out. Two and a half years later, a new release was available, but still without OS X support though. Moreover, the delay between the two versions and the decreasing number of posts on the mailing list indicated that Audiere was about to die.

When our OS X port was finished by Jan, we finally needed a solution and I decided to go for a double-tracked attempt first, keeping our Audiere device as the primary sound system for Windows and Linux and adding OpenAL for OS X. OpenAL turned out to be much more low level and thus harder to integrate, and it was lacking one very basic feature we needed, panning of stereo sounds. For WAV file support, I utilized ALUT which caused Jan some headache integrating it into the OS X build.

With two devices, of which OpenAL was lacking functionality and would be most likely threatened like an unloved stepchild and Audiere was using an outdated technology (OSS), we felt that it was time to reconsolidate this approach and searched for a framework which suited our latest needs. Since I was always a great fan of Irrlicht and its simplicity, irrKlang came to mind. After a first review of its features, license and demos, I decided I could go for a test drive and integrated it into DVW which was an hour work.

irrKlang is still missing an essential functionality we need (setting a streams position) and has some bugs (cracks in the music playback every now and then, sounds with volume 0 were still audible) (see update below) but it was as easy to use as expected. As it’s a relatively young framework and Niko literally depends on its quality, I believe that we’ll get some fixes soon. I just got in touch with him and if I get a positive reply, Christopher and Jan can start to update the Linux and OS X projects respectively and irrKlang will become our audio framework of choice.

As a benefit, we would get true 3D sound, too… cool, eh?

I have prepared a short (very subjective!) overview about the pros and cons that came into my mind for your reference.

Audiere

+ Old, proven framework
+ Broad support of file types (WAV, AIFF, OGG, FLAC, MP3, MOD, S3M, IT, XM)
+ Commercial usage allowed (LGPL)
+ Crossplattform (Windows, Linux, IRIX)
+ Source code available
– Uses OSS audio device under Linux, which is rather old
– No official OSX port available
– Seems to be no longer actively maintained
– 2D sound only

OpenAL

+ Old, proven framework
+ Very crossplattfrom 😉 (Windows, Linux, OS X, Solaris, XBox,…)
+ Commercial usage allowed (LGPL)
+ Easy, OpenGL-ish API
+ Available for Windows, Linux, OSX, and more
+ Bunch of tutorials available
+ 3D sound API
+ Huge list of products using it including recent commercial titles
– Low Level API with no native support for file types or threading
– Alut library is hard to integrate under OS X
– Error handling and information sucks (“Invalid parameter” and the like, doesn’t help much)

irrKlang

– Relatively young framework
– Not freely available for commercial use
– Source code available for a fee only
+ 3D sound API
+ Crossplattform (Windows, Linux, OS X)
+ Broad support of file types (WAV, MP3, OGG, MOD, XM, S3D, IT)
+ Uses the newer ALSA device under Linux
+ Easily extendable by using irrKlangs own plugin mechanism or interface classes
+ Provides a number of built-in effects (doppler effect, echo,…)
+ Clean and easy interface which almost conforms Audieres abstraction level but is yet more powerful
+ Written by an experienced gamedev veteran
+ Well maintained since Niko does it for a living
+ Active community and support forums available

Update

With the commercial version of irrKlang I did not experience the mentioned bugs any further. In the meantime, our Irrlicht integration evolved, too, so I cannot say whether it’s really an irrKlang problem or simply was a bug in DVW.

Next Article

Headphones

  1. i’m surprised you did not consider fmod

  2. Gregory, because I always took commercial usage into consideration and paying $3000+ USD was out of the question.

  3. – Not freely available for commercial use

    compiling software which doesn’t allow one to disable the usage of *cross-plattform* stuff like irrKlang (because it doesn’t run on my box) is pain in the ass…