21
\$\begingroup\$

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?

\$\endgroup\$
1
  • 1
    \$\begingroup\$ "good" is subjective. It would help if you had some specific requirements so answers can be a bit more geared towards your particular needs. \$\endgroup\$
    – Tetrad
    Sep 11, 2010 at 22:00

8 Answers 8

13
\$\begingroup\$

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/

\$\endgroup\$
6
  • \$\begingroup\$ Thanks for your feedback. I searched Game Development for existing questions of this type but not Stack Overflow. \$\endgroup\$
    – reverbb
    Sep 11, 2010 at 19:20
  • \$\begingroup\$ 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. \$\endgroup\$
    – user744
    Sep 11, 2010 at 19:44
  • 3
    \$\begingroup\$ 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. :) \$\endgroup\$
    – Ricket
    Sep 11, 2010 at 20:03
  • \$\begingroup\$ 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?" \$\endgroup\$
    – user744
    Sep 12, 2010 at 8:44
  • 3
    \$\begingroup\$ 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. \$\endgroup\$ Sep 29, 2010 at 21:13
10
\$\begingroup\$

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.

\$\endgroup\$
4
  • 2
    \$\begingroup\$ 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. \$\endgroup\$
    – Kylotan
    Sep 13, 2010 at 9:40
  • 1
    \$\begingroup\$ 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. \$\endgroup\$ Sep 13, 2010 at 20:57
  • \$\begingroup\$ Also when they say cross-platform, they really mean it. The only thing I know of that runs in more places is Unity. \$\endgroup\$
    – coderanger
    Oct 25, 2010 at 18:55
  • \$\begingroup\$ 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. \$\endgroup\$
    – martinpi
    Oct 27, 2010 at 17:13
9
\$\begingroup\$

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.

\$\endgroup\$
5
\$\begingroup\$

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.

\$\endgroup\$
4
\$\begingroup\$

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.

\$\endgroup\$
3
\$\begingroup\$

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

\$\endgroup\$
0
\$\begingroup\$

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.

\$\endgroup\$
0
\$\begingroup\$

libsoundio is low level, but it is cross platform and focuses on robustness. It's a minimal layer between your game and the audio backend of the system.

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .