#1 Members - Reputation: 371
Posted 27 July 2012 - 03:29 PM
The three main options I see right now are Fmod, OpenAL, and PortAudio. However, each one has both pros and cons to them.
Everyone knows Fmod, its used in tons of game, has all sorts of tools to make it easy. There is a free version of it, but I eventually plan to sell my game, so I can't go with a free license. However, I also can't afford to spend $500 on an audio library.
OpenAL seemed to be the next logical choice. Not so simple, not as much documentation, but free to use. However, in looking into it again recently, it appears that development has gone proprietary, and only the old 1.1 version is still freely available. Choosing an old abandoned library to learn to use for the first time doesn't sound like all that great an idea.
And then there is PortAudio. Also free, and very much in active development. However, it is also extremely low level, more targeted towards professional audio applications than games. It seems to be little more than an abstraction of the audio hardware, so everything on top of that (file decoding, volume adjustment, effects, etc.) I would have to do myself (or find another library to sit on top of it). On one hand, it could be really useful when it comes to generating abstract sounds rather than just playing pre-recorded files (something I plan to do eventually to some degree), but for everything else it sounds like it will be a huge undertaking.
None of them seem to be ideal, but I haven't had much luck finding another audio library that fits my requirements. Are there other options that people know of? Something I'm overlooking?
#2 GDNet+ - Reputation: 5613
Posted 27 July 2012 - 03:32 PM
#4 Members - Reputation: 960
Posted 27 July 2012 - 11:25 PM
I have heard some rumours that there are problems with OpenAL on Linux, but I can't confirm the credibility of this rumour.
#6 Members - Reputation: 960
Posted 28 July 2012 - 12:42 AM
Well, you could install SDL + SDL_mixer and then only initialize the AUDIO component and ignore the rest... But that would not make much practical sense I guess.I assume SDL_mixer can't be used independently from the rest of SDL? I'm using GLFW for display and input, I never cared much for SDL.
#8 Members - Reputation: 879
Posted 05 December 2012 - 12:11 PM
I don't really know much about sound libraries, but came across this as I'm looking for something similar.
I stumbled upon a thread on StackOverflow pointing me to SFML.
That seems to be popular, and the license is very open: http://www.sfml-dev.org/license.php
#9 GDNet+ - Reputation: 5613
Posted 05 December 2012 - 12:24 PM
FYI, SFML itself doesn't handle the audio. It just uses sndfile and OpenAL to read/play audio, so you still have to abide by sndfile's and OpenAL's licenses. Look at the bottom of that page you linked to and notice the external libraries used by SFML and their associated licenses, all of which you have to abide by.Sorry about the thread-gravedigging.
I don't really know much about sound libraries, but came across this as I'm looking for something similar.
I stumbled upon a thread on StackOverflow pointing me to SFML.
That seems to be popular, and the license is very open: http://www.sfml-dev.org/license.php
#10 Members - Reputation: 371
Posted 05 December 2012 - 01:11 PM
In the end, I scrapped it and decided to just use each platform's native audio API (XAudio2 on Windows, PulseAudio on Linux) and decode Ogg myself using stb_vorbis, rather than try to find a single cross-platform library to do it all for me. Latency is gone, and I have the platform code abstracted behind a common interface, so it meets my requirements well enough for now.
#11 Members - Reputation: 879
Posted 05 December 2012 - 02:11 PM
FYI, SFML itself doesn't handle the audio. It just uses sndfile and OpenAL to read/play audio, so you still have to abide by sndfile's and OpenAL's licenses. Look at the bottom of that page you linked to and notice the external libraries used by SFML and their associated licenses, all of which you have to abide by.
Sorry about the thread-gravedigging.
I don't really know much about sound libraries, but came across this as I'm looking for something similar.
I stumbled upon a thread on StackOverflow pointing me to SFML.
That seems to be popular, and the license is very open: http://www.sfml-dev.org/license.php
Oh... I didn't notice that. Thanks for the heads-up. I should go with Nairou's approach, then,
although it's tempting to be able to construct sounds on the fly with portaudio...
#12 Members - Reputation: 716
Posted 05 December 2012 - 05:39 PM
I used it some, and it worked fine for me on windows. It loads the formats etc... for you, like FMOD does, so you don't have to worry about that, or thread loading the sound buffers, or anything low level like that. It also does 3d sound. Under the hood, it can use a few different options, depending on the OS. I'd say it is worth a try.






