mackron/miniaudio
FreeAudio playback and capture library written in C, in a single source file.
About mackron/miniaudio
miniaudio is a single-file, cross-platform audio playback and capture library written in C with no dependencies beyond the standard library. It provides both a low-level API for direct access to raw audio data and a high-level API for sound management, mixing, effects, and optional 3D spatialization. The library includes a flexible node graph system for advanced mixing and effect processing, resource management for loading sound files, and built-in decoding support for WAV, FLAC, and MP3 (encoding is WAV only). Additional features include data conversion, resampling, channel mapping, basic waveform and noise generation, and basic effects and filters. It supports all major desktop and mobile platforms and compiles cleanly on major compilers without external packages.
Key Features
Pros & Cons
- Zero external dependencies – only requires standard C library
- Single-file header makes integration trivial
- Cross-platform support for Windows, macOS, Linux, iOS, Android, etc.
- Both low-level and high-level APIs provide flexibility
- Supports common audio formats (WAV, FLAC, MP3) out of the box
- Active open-source project with frequent updates
- Encoding is limited to WAV format only
- Decoding is limited to WAV, FLAC, and MP3; no built-in support for formats like AAC, OGG, or Opus
- Documentation may be sparse for advanced use cases (relies on examples and header comments)