A simple header-only C++ library for reading and writing WAV and AIFF audio files.
AudioFile is a simple, header-only C++ library for reading and writing audio files. It provides a straightforward API to load, manipulate, and save WAV and AIFF audio files with support for various bit depths and sample types. The library solves the problem of handling audio file I/O in C++ projects without requiring complex external dependencies or extensive audio programming knowledge.
C++ developers working on audio applications, digital signal processing projects, game audio systems, or educational tools that require basic audio file reading and writing capabilities.
Developers choose AudioFile for its simplicity, ease of integration as a header-only library, and clean API that abstracts away the complexities of audio file formats. It's particularly valuable for projects that need lightweight audio I/O without the overhead of larger multimedia frameworks.
A simple C++ library for reading and writing audio files.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
As a header-only library, it requires no separate compilation or complex build system setup; simply include AudioFile.h to start using it, as shown in the usage examples.
Methods like load(), save(), and direct buffer access via a vector-of-vectors structure make basic audio I/O straightforward, reducing the learning curve for developers.
Template class supports float, double, and integer types, allowing precise control over audio data storage with detailed tables in the README explaining sample ranges.
Provides getters for sample rate, bit depth, channel count, and duration, enabling quick audio analysis without manual file parsing.
Only reads and writes WAV and AIFF files, lacking support for common compressed formats like MP3 or OGG, which restricts use in applications needing broad compatibility.
Uses asymmetric ranges for integer samples (e.g., int8_t uses [-127, 127]), leading to potential precision loss and requiring careful attention to bit-depth matching, as noted in the type table.
Focuses solely on basic I/O with no built-in support for streaming, real-time processing, or effects, necessitating additional libraries for complex audio tasks.