miniaudio
miniaudio is a free, open-source audio playback and capture library for C and C++.
What miniaudio is
miniaudio is a free, open-source audio playback and capture library for C and C++. It comes as a single source file with no external dependencies, which can be added directly to a project’s source tree. Its low-level API covers playback, capture, full-duplex operation, and device enumeration. A node graph supports mixing, effects, routing, and custom nodes, while the resource manager handles reference counting, streaming large audio sources, and asynchronous loading. The high-level engine combines these pieces to manage sounds with spatialization. Built-in decoding supports WAV, FLAC, and MP3; encoding supports WAV. Custom decoders can add other formats, with Vorbis and Opus given as examples. Listed backends include WASAPI, DirectSound, WinMM, Core Audio, ALSA, PulseAudio, JACK, AAudio, OpenSL|ES, and Web Audio. Supported targets include Windows, macOS, iOS, Linux, BSD variants, Android, Raspberry Pi, and Emscripten/HTML5. Other platforms need a custom backend for playback and capture. Users can choose the public domain or MIT No Attribution license. The project provides a programming manual, API reference, and examples.
Good
- Single source file with no external dependencies.
- Supports playback, capture, and full-duplex audio.
- Streams large audio sources asynchronously.
- Users can choose between two licenses.
Watch out
- Other platforms need a custom audio backend.
- ABI compatibility is not guaranteed between versions.
- Security issues are handled publicly, and fixes may take a while.
Who it suits
miniaudio suits C and C++ developers building audio playback or capture into applications. Its low-level API serves applications handling their own mixing, while the high-level API is intended for complex mixing and effects.
Verdict
miniaudio provides low- and high-level audio APIs in a compact, dependency-free library. Developers should account for its ABI compatibility caveat and platform-specific backend needs.
The facts
Each one read from miniaudio's own pages, with the date it was checked.
What it does
- ABI limitation
- ABI compatibility is not guaranteed between versions, including bug-fix releases, and the manual recommends static linking when building as a library.checked 4 Oct 2001
- Audio APIs
- miniaudio includes low-level and high-level APIs for working with audio devices and audio playback.checked 7 Oct 2001
- Audio backends
- Listed backends include WASAPI, DirectSound, WinMM, Core Audio, ALSA, PulseAudio, JACK, AAudio, OpenSL|ES, and Web Audio.checked 4 Oct 2001
- Audio engine
- The high-level engine combines resource management and the node graph for managing sounds with spatialization.checked 4 Oct 2001
- Built-in formats
- The documentation lists built-in WAV, MP3, and FLAC decoding, and WAV encoding.checked 7 Oct 2001
- Compatibility limit
- The documentation says ABI compatibility is not guaranteed between versions, including bug-fix releases, and recommends static linking over shared-object builds.checked 7 Oct 2001
- Custom decoders
- Custom decoders can extend format support; the site gives Vorbis and Opus as examples.checked 7 Oct 2001
- Distribution
- The library is a single source file with no external dependencies and can be added directly to a project’s source tree.checked 4 Oct 2001
- Documentation and examples
- The site provides a programming manual, API reference, and examples.checked 7 Oct 2001
- Formats
- Built-in decoding supports WAV, FLAC, and MP3, while encoding supports WAV.checked 4 Oct 2001
- Intended use
- The documentation describes the low-level API as suited to applications that handle their own mixing, and the high-level API as suited to complex mixing and effects.checked 7 Oct 2001
- License
- The site says miniaudio is released into the public domain and offers a choice of public domain or MIT No Attribution licensing.checked 7 Oct 2001
- Low-level API
- The low-level API supports audio playback, capture, full-duplex, and device enumeration.checked 4 Oct 2001
- Mixing and effects
- Its node graph supports mixing, effect processing, custom nodes, and audio routing.checked 7 Oct 2001
- Packaging
- The library consists of a single source file and has no external dependencies.checked 7 Oct 2001
- Purpose
- miniaudio is an audio playback and capture library for C and C++.checked 7 Oct 2001
- Resource management
- The resource manager supports reference counting, streaming large audio sources, and asynchronous loading.checked 7 Oct 2001
- Security handling
- The maintainer says security issues are handled publicly and transparently, and that addressing them can take a while.checked 4 Oct 2001
- Support
- The security policy directs users to submit a pull request or post a ticket to the public GitHub issue tracker.checked 4 Oct 2001
- Supported targets
- The project lists Windows, macOS, iOS, Linux, BSD variants, Android, Raspberry Pi, and Emscripten/HTML5 as supported platforms.checked 4 Oct 2001
Where it runs
- Platform limitation
- On other platforms, playback and capture require implementing a custom backend.checked 4 Oct 2001
- Platforms
- The site lists Windows, macOS, Linux, BSD, iOS, Android, and Web through Emscripten.checked 7 Oct 2001
Alternatives to miniaudio
- 1

Unity Version Control
Free planWebAPILinuxmacOS8.1Free plan - 2
Audiokinetic Wwise
Free planAndroidiOSLinuxmacOS7.4$8,000, paid once - 3

Amplitude Audio SDK
Free planAndroidiOSLinuxmacOS6.8Free plan - 4

Elias
AndroidiOSmacOSWindows6.8€5,850, paid once - 5
irrKlang
Free planLinuxmacOSWindows6.8€65, paid once - 6
psai
Free planAndroidiOSAPILinux6.8Free plan
