Miniaudio is a cross platform open source C library for implementing low level audio functionality including playback and capture. MiniAudio is released under either public domain or MIT No Attribution licenses and amazingly enough is implemented as a single .H file with no external dependencies (except optionally stb_orbis if Ogg Vorbis format support is desired).
Miniaudio features include:
- Your choice of either public domain or MIT No Attribution.
- Entirely contained within a single file for easy integration into your source tree.
- No external dependencies except for the C standard library and backend libraries.
- Written in C and compilable as C++, enabling miniaudio to work on almost all compilers.
- Supports all major desktop and mobile platforms, with multiple backends for maximum compatibility.
- Supports playback, capture, full-duplex and loopback (WASAPI only).
- Device enumeration for connecting to specific devices, not just defaults.
- Connect to multiple devices at once.
- Shared and exclusive mode on supported backends.
- Backend-specific configuration options.
- Device capability querying.
- Automatic data conversion between your application and the internal device.
- Sample format conversion with optional dithering.
- Channel conversion and channel mapping.
- Resampling with support for multiple algorithms.
- Simple linear resampling with anti-aliasing.
- Optional Speex resampling (must opt-in).
- Filters.
- Biquad
- Low-pass (first, second and high order)
- High-pass (first, second and high order)
- Second order band-pass
- Second order notch
- Second order peaking
- Second order low shelf
- Second order high shelf
- Waveform generation.
- Sine
- Square
- Triangle
- Sawtooth
- Noise generation.
- White
- Pink
- Brownian
- Decoding
- WAV
- FLAC
- MP3
- Vorbis via stb_vorbis (not built in – must be included separately).
- Encoding
- WAV
- Lock free ring buffer (single producer, single consumer).
Miniaudio is available on GitHub and has solid documentation available here and several examples available here. Installation consists of downloading and #include’ing the header and that is it, making this a remarkably simple library to get started using. There are also unofficial language bindings for Go, Rust and Python available as well. You can learn more about the Miniaudio library in the video below (or view here on Odysee).