A minimalistic, single-header MP3 decoder library focused on small size, speed, and ISO conformance.
minimp3 is a minimalistic, single-header MP3 decoder library written in C. It decodes MP3 audio streams into PCM samples with a focus on small code size, high performance through SIMD optimizations, and strict ISO conformance. It solves the need for a lightweight, portable decoder that can be easily embedded in applications without heavy dependencies.
Developers working on embedded systems, games, or applications where audio decoding is needed with minimal memory and binary footprint, such as those using C/C++ in resource-constrained environments.
Developers choose minimp3 for its combination of minimalism, correctness, and speed. Unlike other minimal decoders, it supports free format, passes conformance tests, and includes SIMD optimizations, all while maintaining a tiny codebase that's easy to integrate.
Minimalistic MP3 decoder single header library
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
The entire library is a single C header file, enabling easy integration by just defining MINIMP3_IMPLEMENTATION in one source file, as per the README.
Passes all conformance tests with PSNR > 96dB, ensuring high-fidelity decoding that adheres to the MP3 standard, demonstrated in the benchmark table.
Includes SSE and NEON intrinsics for accelerated decoding on x86 and ARM, with benchmarks showing low clockticks per second for efficient processing.
Handles non-standard MP3 streams that other minimal decoders reject, improving compatibility with a wider range of MP3 files.
Requires large input buffers (up to 10 frames) for reliable sync, and short buffers can cause false sync or artefacts, adding complexity to stream handling.
Focuses only on MP3 decoding without built-in encoding, audio mixing, or support for other formats, necessitating additional libraries for broader audio needs.
SIMD performance relies on compile-time defines and specific hardware (SSE/NEON), which may not be available on all platforms, leading to inconsistent speeds.