audio-formats
audio-formats is meant to be the easiest package to load and write sounds in D.
Features
β Decode from WAV / QOA / MP3 / FLAC / OPUS / OGG / MOD / XMβ Encode to WAV / QOAβ File and memory supportβ Seeking supportβ Chunked supportβ floatanddoublesupportβ Encoding with dithering when reducing bit-depthβ nothrow @nogcAPIβ Archs:x86/x86_64/arm64
Changelog
π audio-formats v2
- Doesn't depend upon
dplug:coreanymore. - All exceptions thrown by
audio-formatsare nowAudioFormatsException.
They must be clean-up withdestroyAudioFormatException. - v2.1 QOA format decoding support (https://github.com/phoboslab/qoa). Note that the QOA bitstream isn't finalized, and will change.
- v2.2 QOA format encoding support.
π audio-formats v1
- Initial release.
How to use it?
- Add
audio-formatsas dependency to yourdub.jsonordub.sdl. - See the transcode example for usage.
What formats are supported exactly?
| Decoding | Encoding | Seeking support | |
|---|---|---|---|
| π WAV | Yes | Yes | Sample |
| Yes | No | Sample | |
| Yes | No | Sample | |
| Yes (LGPL) | No | Sample | |
| Yes | No | Sample | |
| Yes | Yes | Sample | |
| Yes | No | Pattern+Row | |
| Yes | No | Pattern+Row |
Some of these decoders were originally translated by Ketmar, who did the heavy-lifting.
License
βοΈ Boost license otherwise.βοΈ MIT license when including QOA.βοΈ LGPL v2.1 for OPUS. (use DUB subconfigurations) to choose, default is boost.
External links and references
- https://github.com/Zoadian/mp3decoder
- https://github.com/rombankzero/pocketmod
- https://github.com/Artefact2/libxm
Ultra secret options
-The following version identifiers can be used to enable/disable decoder level features
| Version Identifier | Feature |
|---|---|
| AF_LINEAR | Use linear sampling for MOD modules instead of Amiga sampling |
Bugs
framesRemainingInPatternis unimplemented for XM currently.