Hi folks.
I uploaded a very early version of an audio library I’ve been tinkering
with lately. I started it because I wanted something to replace
SDL_mixer and SDL_sound with. It’s LGPL licensed.
It only outputs mono and stereo right now. Hopefully we’ll get to 7.1
surround later on (for upmixing and playing surround sources.) This is a
2D audio library though; there’s no intent to introduce 3D positioning
of sounds.
It uses three different resamplers: Speex (the Opus version), SoxR and
SRC (libsamplerate). The Speex one is integrated. The others need their
respective external libraries. Resampling only happens when the source
signal’s sample rate doesn’t match the output rate.
It does floating-point mixing of any amount of audio sources. I hope to
add some features like dithering and a limiter in the future, for the
audiophiles
The audio sources come from decoders. The included decoders rely on
libvorbis, libmpg123, libsndfile, libmodplug and libfluidsynth to play
many different sound formats (Ogg/Vorbis, MP3, FLAC, MOD-based files,
MIDI, WAV, AIFF, etc.)
There is only a C++ API at the moment, and it will break and change on a
daily basis. This is version 0.0.0
I’m hoping to add a C API too in the future, which emulates SDL_mixer
(with some added functions) which would server as an API and ABI
compatible drop-in replacement for programs using SDL_mixer. (There’s a
bit of that already, but it’s mostly just stub functions; not really
useful yet.)
There’s no support yet for fade-in and fade-out. Seeking works fine
though (except for MIDI, which doesn’t support it.)
The only platform I’m using this at the moment is Linux. I have not even
considered other platforms yet. This will come later.
If you’re interested in this, it’s on GitHub:
https://github.com/realnc/SDL_audiolib
and the API documentation (always in flux, maybe some parts missing):
http://realnc.github.io/SDL_audiolib
The docs show a quick “hello world” program on the main page.