Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I'm currently looking into adding sound to my game. I have seen OpenAL and SDL, but I would like to know what else is out there. Can you recommend any good cross-platform Audio APIs for game development?

share|improve this question
1  
"good" is subjective. It would help if you had some specific requirements so answers can be a bit more geared towards your particular needs. –  Tetrad Sep 11 '10 at 22:00

7 Answers 7

Stack Overflow question: "Cross platform sound API for games?"

I agree with the accepted answer:

I'm a big fan of SFML Library. It does provide additional Graphic and Network features, but what is relevant to this question, is that it also has neat Audio package.

Audio features are:

  • Uses hardware acceleration whenever possible
  • Can load and save standard sound formats : ogg, wav, flac, aiff, au, raw, paf, svx, nist, voc, ircam, w64, mat4, mat5 pvf, htk, sds, avr, sd2, caf, wve, mpc2k, rf64
  • Can load all audio resources directly from files in memory
  • 3D sound spacialization
  • Easy interface for capturing audio
  • Manages memory efficiently, so that you don't have to worry about resources lifetime or storage
  • Supports streaming for big files ; you can even write your custom streaming class for any source (network, ...)
  • Supports multi-channels formats (mono, stereo, 4.0, 5.1, 6.1, 7.1)

Website: http://www.sfml-dev.org/

share|improve this answer
    
Thanks for your feedback. I searched Game Development for existing questions of this type but not Stack Overflow. –  reverbb Sep 11 '10 at 19:20
    
Apparently, you can't vote to close with a reference to a post on another SE site, so approving this answer is probably the best possible outcome for the question. –  user744 Sep 11 '10 at 19:44
3  
And regardless, it doesn't necessarily need to be closed. Some people might support Tetrad's choice of FMOD, for example, which was not mentioned in the SO question. I only posed the question to build upon it, not to suggest it's an exact duplicate, since the game development audience isn't an exact duplicate of the SO audience. :) –  Ricket Sep 11 '10 at 20:03
    
I disagree; it should be closed and redirected to the SO question. Otherwise we split future answers between two places. And it is the exact same question - this is "Cross-Platform Audio API Suggestions [for game development]', and the other is "Cross-platform sound API for games?" –  user744 Sep 12 '10 at 8:44
2  
We're getting the game developer answer here (which, in this case, happens to be the same). No one came to this site to get Stack Overflow answers, they wanted opinions from professionals specifically interested in supporting a game developer community. If they're the same, so be it, because that certainly won't always be the case, and that's part of the reason this site is useful. See meta.gamedev.stackexchange.com/questions/3/… for more explanation. –  Christopher Horenstein Sep 29 '10 at 21:13

The sort of de-facto API for sound implementation in games these days as far as I'm concerned is FMOD.

It's free for non-commericial uses, and relatively inexpensive for "casual" (read: indie) development.

It is a bit overkill for the simple "play back this sound" requirement, but does provide a huge feature set that's well tested on all sorts of platforms.

share|improve this answer
2  
Re: "It is a bit overkill for the simple "play back this sound" requirement" - I think it's high time that developers moved beyond just "play back this sound"! Few people settle for a graphics API that just allows 2D sprites and I think we need to start demanding more from our audio also. –  Kylotan Sep 13 '10 at 9:40
    
Sadly, FMOD is very buggy and the developers are slow to respond to issues. For simple "play this sound" it's fine, but once you start really using it the deficiencies really start to show through. –  dash-tom-bang Sep 13 '10 at 20:57
    
Also when they say cross-platform, they really mean it. The only thing I know of that runs in more places is Unity. –  coderanger Oct 25 '10 at 18:55
    
I've used FMod in several iPhone projects and didn't find it particularly buggy as long as I stuck to the low level API. FMod Designer of course is a different beast. I also found the forums pretty good and the staff there very supportive. I heard the console versions of FMod are less stable (and far more expensive) than PC/Mac/iPhone but don't have experience with those. –  martinpi Oct 27 '10 at 17:13

OpenAL

I really like OpenAL as a cross-platform audio library. The API is a bit low level but you can easily wrap it into a nicer engine friendly interface. It's truly cross platform with first class support for: iPhone, Android, MacOSX, Windows, and Linux.

Take a look at Djinn Engine sound code. Two files, maybe 300 lines between them (counting comments etc) and you'vd got a workable sound system.

I've never build an audio centric game, so OpenAL might not fit the bill if extreme control is needed.

share|improve this answer

If FMOD isn't an option then Audiere is a good open source alternative. It hasn't been updated in a long time but it's cross platform, easy to use, and has a good feature set.

share|improve this answer

Additionally to FMOD, there is Audiokinetic Wwise, which is more and more used in the game industry as a professional cross-platform sound design tool and API. It has a large selection of effects (including convolution reverb), complex sound logic system, sound layering, profiling, interactive music tools, etc... It provides a good selection of decoding algorithms and is also free for non-commercial projects.

share|improve this answer

The Kowalski engine is a data driven cross platform audio library released under the zlib license.

share|improve this answer

As you're just curious about other stuff out there, I don't see any mention of Miles on here yet. I've not used it myself (although we did use it many years ago on a game), however these games use it.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.