Read me About Demoscene? Links Contact

Choosing the right audio library is difficult!

Lately I’ve been interested in audio libraries and thus have tried a wide rangeĀ - to be exact OpenAL, SDL_Audio, FMOD and BASS.

Which library should I use for cross platform development?

This really depends on what you want to achieve. If the goal is simply to have MP3 replay on many platforms - then I’d say that SDL_Audio is fine. However, if you need it for a game or something similar then SDL_Audio comes short as it’s pretty unstable and lacks functionality, e.g. all samples must be in IFF or WAV, it can only play 1 music-chunk at the time (music-chunk being mp3, ogg, etc).

So, for cross platform demos, I’d stick with the SDL-family (audio, video, image loading, etc).

For cross platform games or slightly more advanced applications I’d either make a generic wrapper and choose an audio library for each platform or go for something like OpenAL or FMOD (and perhaps use other means of timing that what’s provided by FMOD).

For Windows demos, I’d use BASS for audio replay if you need to interact with data within the audio stream and SDL_Audio if you just need to play the audio stream with no interaction.

My own game engine is based on the SDL-family for better or worse. I hope it will pay off when porting content from Windows to MacOS and Linux platforms.