Libsoundwave
C++ library for decoding audio files (wav, ogg, opus, flac, etc.)
Install / Use
/learn @warrengalyen/LibsoundwaveREADME
Libsoundwave
Libsoundwave is a small C++ 11 library for reading sampled audio data from disk or memory. It's ideal to use as an audio asset frontend for games, audio sequencers, music players, and more.
The library steers away from patent or GPL license encumbered formats (such as MP3 and AAC). For portability, libsoundwave does not link against platform-specific APIs like Windows Media Foundation or CoreAudio, and instead bundles the source code of reference decoders as an implementation detail.
Libsoundwave is meant to be statically linked, which is not the case with other popular libraries like libsndfile (which is licensed under the LGPL). Furthermore, the library is not concerned with supporting very rare encodings (for instance, A-law PCM or the SND format).
While untested, there are no technical conditions that preclude compilation on other platforms with C++ 11 support (Android NDK r10e+, Linux, iOs, etc).
Format Support
Regardless of input bit depth, the library hands over an interleaved float array, normalized between [-1.0, +1.0]. At present, the library does not provide resampling functionality.
- Wave (+ IMA-ADPCM encoding)
- Ogg Vorbis
- Ogg Opus
- FLAC
- WavPack
- Musepack
- MIDI files (with soundfonts)
- libmodplug formats (669, amf, ams, dbm, dmf, dsm, far, it, j2b, mdl, med, mod, mt2, mtm, okt, pat, psm, ptm, s3m, stm, ult, umx, xm)
Encoding
Simply but robust WAV format encoder now included. Extensions in the near future might include Ogg.
Support Project Files
- Visual Studio 2017
License
This library is released under the simplied 2 clause BSD license. All included dependencies have been released under identical or similarly permissive licenses.
Related Skills
node-connect
352.0kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
111.1kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
352.0kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
352.0kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
