Skip to content

AuburnSounds/audio-formats

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 

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
  • βœ… float and double support
  • βœ… Encoding with dithering when reducing bit-depth
  • βœ… nothrow @nogc API
  • βœ… Archs: x86 / x86_64 / arm64

Changelog

πŸ”” audio-formats v2

  • Doesn't depend upon dplug:core anymore.
  • All exceptions thrown by audio-formats are now AudioFormatsException.
    They must be clean-up with destroyAudioFormatException.
  • 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-formats as dependency to your dub.json or dub.sdl.
  • See the transcode example for usage.

What formats are supported exactly?

Decoding Encoding Seeking support
πŸ“€ WAV Yes Yes Sample
πŸ“€ MP3 Yes No Sample
πŸ“€ FLAC Yes No Sample
πŸ“€ OPUS Yes (LGPL) No Sample
πŸ“€ OGG Yes No Sample
πŸ“€ QOA Yes Yes Sample
πŸ“€ MOD Yes No Pattern+Row
πŸ“€ XM 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

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

  • framesRemainingInPattern is unimplemented for XM currently.