handmade.network » Forums » Handmade Audio Options
timothy.wright
Timothy Wright
72 posts
1 project
#11816 Handmade Audio Options
3 weeks ago

Hey Handmade community,

Feverishly working on my Kiss engine project, I have everything for a 2D game except audio. Are there any good stb libraries for this kind of thing? It's been my experience that audio is the one place where you just have to use a 3rd party, like FMOD or WWise or something.

Having only heard horror stories about OpenAL-Soft, and some complaints about it from Ron Gillbert on Thimbleweed Park, I'm not sure that's the way to go, even though that seems to be what everyone uses these days.

what do you guys recommend?
stevetranby
Steve Tranby
11 posts

Code Monkey

#11821 Handmade Audio Options
3 weeks ago Edited by Steve Tranby on May 4, 2017, 1:33 a.m.

I'd probably try SoLoud first, mostly because I'm interested in how well it works myself.

The HMN solution always seems to be stb_vorbis + custom PCM loading + platform's audio driver (DirectSound, XAudio, CoreAudio, et al)

Depending on target platforms you could use OpenAL directly (instead of the excessively 'wrapped' OpenAL-soft).

If you'd like to support iOS/Android then I'd look into:
  • SDL has a fairly comprehensive set of supported audio backends.
  • Cricket Tech is a free (but not open source) simplistic framework that a few others have recommended as being a solid option.
  • Extract cocos2d-x's AudioEngine which is fairly solid as of 3.15.

Note: Android has had a ton of latency issues related to specific device driver issues:
* granted, if you only care about Android 7+ and latest devices I think most are fixed, though I'd still follow the NDK guides

Edit: FMod/WWise are indeed great options if the pricing and/or features makes sense for your needs (and I believe both are free for non-commercial, and even for small budget developments). Ideally you'd support both as plugins to your engine.

I see 0xdeadc0de everywhere
timothy.wright
Timothy Wright
72 posts
1 project
#11826 Handmade Audio Options
3 weeks ago

Right now the code is only for Mac/Windows/Linux, so I'm not worried about other devices. I have watched the Handmade Hero videos for audio, but I really don't want to write all the audio myself if I can help it. Too much other stuff to do, and I know you can get lost in something like that.

I'm currently look at http://libsound.io/

I seems like a good wrapper for the backend stuff, and probably the kind of thing the HMD community would write. I just hoped there was some resource that I had missed.
D3zmodos
6 posts
#11831 Handmade Audio Options
3 weeks ago

I've used libsoundio. It was really easy to use, had decent examples/documentation. I did experience one or two issues with it, but tracking down the source of the problem was pretty easy given how simple libsoundio is internally.
timothy.wright
Timothy Wright
72 posts
1 project
#11832 Handmade Audio Options
3 weeks ago Edited by Timothy Wright on May 4, 2017, 4:53 p.m.

D3zmodos:
I've used libsoundio. It was really easy to use, had decent examples/documentation. I did experience one or two issues with it, but tracking down the source of the problem was pretty easy given how simple libsoundio is internally.


I know that using something like this can have some issues, esspecially since it only has a few people working on it, but I really want small, clean, C code for everything. The C++ engine looks good but I'm trying to stay true to the stb/Handmade Hero ideas.

It's good to know that you've used it and it worked.