Simple C audio library

audio, c, static-libraries, wav

Solution

I would recommend PortAudio + libsndfile. Very popular combo, meets your requirements. Used by many other software applications including audacity.

Problem

I'm looking for a simple-ish library for outputting audio. I'd like it to meet these criteria: - Licensed under LPGL/zlib/MIT or something similar – i'm going to use it in an indie commercial application and i don't have the money for a license. - Written in C, but C++ is fine. - Cross-platform (Windows, Linux, maybe OSX) - Able to read from some sort of audio file (i'd prefer WAV or OGG but i will gladly use less popular formats if need be) in memory (i've seen the use of a memfile struct and user-defined I/O callbacks). I need the file to be in memory because i put all my resources into a .zip archive, and i use another library to load those archived files into memory. - Supports playing multiple sounds at the same time, having a max of 8 or so is ok. - I'd really like to either have the source code or a static library (MinGW/GCC `lib???.a`), but if nothing else is available i will use a shared library. I must have come accross two dozen different audio libraries in my search, all of which haven't quite met these criteria...

Original source