An audio playback and capture library for C and C++.
Download miniaudio.h
miniaudio is an audio playback and capture library for C and C++. It's made up of a single source file, has no external dependencies and is released into the public domain.
Simple Build System
Just add to your source tree and go. There's no need to install any dependencies or development packages, nor are there any build systems to waste time on.
Cross Platform
miniaudio works on all the major desktop and mobile platforms, including Windows, macOS, Linux, BSD, iOS, Android and Web (via Emscripten).
Simple API
miniaudio has a simple, flexible and modular API that gets out of your way.
Open Source
miniaudio is open source with a permissive license of your choice of public domain or MIT No Attribution.
Detailed Documentation
miniaudio has some of the best documentation of any open source audio library and includes a suite of examples.
And Much More
Built-in decoders, advanced mixing and effect processing, resource management, 3D spatialization, filters, data conversion and more.
Major Features
Flexible and Modular API
miniaudio gives you complete flexibility. With the low level API, just initialize a connection to the device and send or receive raw audio data. The modular design of miniaudio allows you to use the low level API without compromising your ability to make use of other features like the node graph and resource manager.
Advanced Mixing and Effect Processing
miniaudio's node graph system gives you an easy way to set up advanced mixing and effect graphs. Each node sends it's output to another node, and so on and so forth to produce all kinds of effects. You can even implement your own custom nodes and plug them in however you like. Plug multiple nodes into the same input node for mixing and use the splitter node for complex routing.
Resource Management
The resource manager is used for simplifying the hassle of dealing with the loading and management of your audio resources. It will reference count files so they're only loaded once and handles streaming of large audio sources to save on memory. It can even load files asynchronously and exposes it's job system so you can handle resource management jobs from your existing job infrastructure.
High Level Audio Engine
The high level audio engine in miniaudio encapsulates the resource manager and node graph to give you an easy to use API to manage sounds within a 3D scene with spatialization. The engine is a node graph, and each sound in the scene is a node within that graph which means you can take advantage of miniaudio's graph based effect processing and routing infrastructure.
Platforms
Windows macOS / iOS Linux FreeBSD / OpenBSD / NetBSD Android
WASAPI
DirectSound
WinMM
Core Audio ALSA
PulseAudio
JACK
OSS
sndio
audio(4)
AAudio
OpenSL | ES
Web
Emscripten / WebAudio
Copyright © 2022 David Reid
Developed by David Reid - mackron@gmail.com