Add sound effects and background music to a C or C++ game by dropping in a single header file.
Build a cross-platform command-line audio player that runs on Windows, macOS, and Linux with no install steps.
Process raw audio streams or build a custom effects chain using the low-level node graph API.
Create a voice recorder app on Android or iOS using the built-in capture API.
Drop in one header file and compile, no external dependencies needed on Windows or macOS.
miniaudio is a C library that handles audio playback and audio capture for programs. The entire library ships as a single source file, which means you add one file to your project and start playing sounds, rather than installing or configuring a separate audio system. The library requires no external dependencies beyond what is already included with any standard C compiler. On Windows and macOS it requires nothing extra at all. On Linux and similar systems you link two standard system libraries. This keeps the setup simple: drop in the files, compile, and it works. It runs on a wide range of platforms, including Windows, macOS, iOS, Linux, the BSD family of operating systems, Android, Raspberry Pi, and web browsers via Emscripten. Each platform uses the audio backend that fits it best, such as WASAPI on Windows, Core Audio on Apple devices, ALSA or PulseAudio on Linux, and Web Audio in browsers. There are two levels of API. The high-level API lets you load a sound file and play it in just a few lines of code. The low-level API gives you direct access to raw audio data, which is useful if you need precise control over how audio is processed. Between these two, miniaudio includes a node graph system for building custom audio processing chains, mixing multiple sounds, adding effects, and optional 3D spatial audio positioning. Decoding is built in for WAV, FLAC, and MP3. Encoding is supported for WAV. The library also includes resampling (converting between different sample rates), channel mapping, basic waveform generation for things like sine waves and noise, and a set of built-in filters and effects. Documentation lives at miniaud.io and also inside the header file itself. The license gives you a choice between public domain terms or a permissive no-attribution MIT variant.
← mackron on gitmyhub — every repo by this author, as a profile.
Verify against the repo before relying on details.