mackron/miniaudio is a Mobile project on GitHub, written primarily in C. It has 7.6k stars. Audio playback and capture library written in C, in a single source file.
Snapshot summary built from the project's own GitHub metadata — there's no written TopGit review yet. The page will update automatically when a full review is published.
WHY NO REVIEW YET
TopGit writes full reviews for the most-starred, most-requested repositories. This page is a snapshot until then — see the READ ME tab for the original README in full.
An audio playback and capture library in a single source file.
Features -
Examples -
Building -
Documentation -
Supported Platforms -
Security -
License
miniaudio is written in C with no dependencies except the standard library and should compile clean on all major
compilers without the need to install any additional development packages. All major desktop and mobile platforms
are supported.
Features
Simple build system with no external dependencies.
Simple and flexible API.
Low-level API for direct access to raw audio data.
High-level API for sound management, mixing, effects and optional 3D spatialization.
Flexible node graph system for advanced mixing and effect processing.
Resource management for loading sound files.
Decoding, with built-in support for WAV, FLAC, and MP3, in addition to being able to plug in custom decoders.
Encoding (WAV only).
Data conversion.
Resampling, including custom resamplers.
Channel mapping.
Basic generation of waveforms and noise.
Basic effects and filters.
Refer to the Programming Manual for a more complete description of
available features in miniaudio.
Examples
This example shows one way to play a sound using the high level API.
#include "miniaudio/miniaudio.h"
#include <stdio.h>
int main()
{
ma_result result;
ma_engine engine;
result = ma_engine_init(NULL, &engine);
if (result != MA_SUCCESS) {
return -1;
}
ma_engine_play_sound(&engine, "sound.wav", NULL);
printf("Press Enter to quit...");
getchar();
ma_engine_uninit(&engine);
return 0;
}
This example shows how to decode and play a sound using the low level API.
More examples can be found in the examples folder or online here: https://miniaud.io/docs/examples/
Building
Just compile miniaudio.c like any other source file and include miniaudio.h like a normal header. There's no need
to install any dependencies. On Windows and macOS there's no need to link to anything. On Linux and BSD just link
to -lpthread and -lm. On iOS you need to compile as Objective-C. Link to -ldl if you get errors about
dlopen(), etc.
If you get errors about undefined references to __sync_val_compare_and_swap_8, __atomic_load_8, etc. you
need to link with -latomic.
ABI compatibility is not guaranteed between versions so take care if compiling as a DLL/SO. The suggested way
to integrate miniaudio is by adding it directly to your source tree.
You can also use CMake if that's your preference.
Documentation
Online documentation can be found here: https://miniaud.io/docs/
Documentation can also be found at the top of miniaudio.h
which is always the most up-to-date and authoritative source of information on how to use miniaudio. All other
documentation is generated from this in-code documentation.
Supported Platforms
Windows
macOS, iOS
Linux
FreeBSD / OpenBSD / NetBSD
Android
Raspberry Pi
Emscripten / HTML5
miniaudio should compile clean on other platforms, but it will not include any support for playback or capture
by default. To support that, you would need to implement a custom backend. You can do this without needing to
modify the miniaudio source code. See the custom_backend example.
Backends
WASAPI
DirectSound
WinMM
Core Audio (Apple)
ALSA
PulseAudio
JACK
sndio (OpenBSD)
audio(4) (NetBSD and OpenBSD)
OSS (FreeBSD)
AAudio (Android 8.0+)
OpenSL|ES (Android only)
Web Audio (Emscripten)
Null (Silence)
Custom
Security
See the miniaudio security policy.
License
Your choice of either public domain or MIT No Attribution.
The most recent commit recorded on mackron/miniaudio was 3 months ago, based on the GitHub push timestamp. The repository has 645 forks — one of the better signals of community interest.
Is mackron/miniaudio open source?
TopGit's metadata for mackron/miniaudio does not record a license. Most public repositories on GitHub ARE open source, but the exact terms vary — verify by opening the LICENSE file directly.
The project maintains a homepage at https://miniaud.io. The README tab on this page also usually contains screenshots and a quickstart.
Where do I read more about mackron/miniaudio?
This TopGit page is a snapshot — the READ ME tab shows the project's own README content (links stripped, images preserved). The GitHub repository at github.com/mackron/miniaudio is the definitive source.
Read full README in the tab above.
Want a second opinion on miniaudio?
Ask an AI that can read this page — one click and you get its take on miniaudio.