• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.
Sign in to follow this  
Followers 0
Nairou

Audio library pros/cons

11 posts in this topic

I'm ready to start adding sound effects to my game, so I've been looking at audio libraries. My requirements are that the library be cross-platform, free for commercial use, and under a friendly license (not GPL/LGPL).

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?
1

Share this post


Link to post
Share on other sites
Out of curiosity, why do you consider the LGPL to not be friendly?
0

Share this post


Link to post
Share on other sites
Admittedly not for very strong reasons. Mostly because it prevents me from static linking the library. I don't know if there are other restrictions, the LGPL license is rather cryptic.
1

Share this post


Link to post
Share on other sites
Why not SDL_mixer? If you want cross platform you would probably want to use the basic SDL anyway, so adding to it the mixer library seems like the most convenient choice.

I have heard some rumours that there are problems with OpenAL on Linux, but I can't confirm the credibility of this rumour.
0

Share this post


Link to post
Share on other sites
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.
0

Share this post


Link to post
Share on other sites
[quote name='Nairou' timestamp='1343455420' post='4963871']
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.
[/quote]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.
0

Share this post


Link to post
Share on other sites
You should try MMAV (see [url="http://chucklesoft.blogspot.com"]http://chucklesoft.blogspot.com[/url]).
-2

Share this post


Link to post
Share on other sites
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
0

Share this post


Link to post
Share on other sites
[quote name='SuperVGA' timestamp='1354731107' post='5007464']
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: [url="http://www.sfml-dev.org/license.php"]http://www.sfml-dev.org/license.php[/url]
[/quote]
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.
0

Share this post


Link to post
Share on other sites
As a follow up, I used PortAudio for a while, and got everything up and running with Ogg playback. It worked well, sounded good, but had non-constant latency that I could never fully get rid of.

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.
0

Share this post


Link to post
Share on other sites
[quote name='Cornstalks' timestamp='1354731855' post='5007468']
[quote name='SuperVGA' timestamp='1354731107' post='5007464']
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: [url="http://www.sfml-dev.org/license.php"]http://www.sfml-dev.org/license.php[/url]
[/quote]
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.
[/quote]

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...
0

Share this post


Link to post
Share on other sites
There is a library called [url="http://www.ambiera.com/irrklang/irrklang_pro.html"]irrKlang[/url] that has been created by Niko who created the Irrlicht 3d engine(at least before it was left to the community). It is a commercial engine, but it is cross-platform, and isn't near the price of FMOD. It depends on how much you intend to sell the game for though. You can also use the free version until you are ready to sell, so that you can do the testing and even development of the game meanwhile.

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.
0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0