handmade.network » Forums » Simple C++/C sound libraries?
MandleBro
Jack Mott
98 posts
1 project

Web Developer by day, game hobbyist by night. Fond of C and F#

#7440 Simple C++/C sound libraries?
1 year, 4 months ago

I'd like something that would work on windows/linux/osx, and be able to mix 3+ sound files at a time. Doesn't matter much what format, as long as it is one I can easily convert the source material to.
mmozeiko
Mārtiņš Možeiko
1503 posts
1 project
#7442 Simple C++/C sound libraries?
1 year, 4 months ago

Do you need also loading or just mixing? Because mixing is just a loop with adding numbers together.
For loading and playback you can look at:
alure + openal - http://kcat.strangesoft.net/alure.html (open source)
irrKlang - http://www.ambiera.com/irrklang/ (free for non-commercial use)
Cricket audio - http://www.crickettechnology.com/ (free to use)
fmod - http://www.fmod.org/ (free for non-commercial use)
bass - http://www.un4seen.com/ (free for non-commercial use)
SDL_Mixer, if you already use SDL - https://www.libsdl.org/projects/SDL_mixer/ (open-source)

mackron
David Reid
3 posts
#7444 Simple C++/C sound libraries?
1 year, 4 months ago

Unfortunately this doesn't yet support OSX, but I figured it wouldn't hurt to just quickly mention the audio library I'm working on in case someone might find it interesting - dr_audio. It's C/C++, public domain, single file and optionally supports loading and decoding of WAV, FLAC and Vorbis through the use of dr_wav, dr_flac and stb_vorbis respectively. Unfortunately it's still very early in development, though, so it's missing features and optimizations and no doubt has bugs.
MandleBro
Jack Mott
98 posts
1 project

Web Developer by day, game hobbyist by night. Fond of C and F#

#7449 Simple C++/C sound libraries?
1 year, 4 months ago

Thanks, I'll take a look at those. Yes, need loading and playback as well.