ddiakopoulos / libnyquist

:microphone: Cross platform C++11 library for decoding audio (mp3, wav, ogg, opus, flac, etc)
BSD 2-Clause "Simplified" License
536 stars 64 forks source link

Add WAV-IMA/ADPCM support #11

Closed r-lyeh-archived closed 8 years ago

r-lyeh-archived commented 8 years ago

ADPCM is extremely helpful when streaming hundred of megabytes from disk. mmap()-ing wav files from disk, then decoding adpcm on the fly is one of the cheapest solutions, specially for mobile devices.

The source (MIT license) for a IMA/ADPCM decoder can be found here: https://github.com/afterwise/aw-ima/

r-lyeh-archived commented 8 years ago

zlib licensed, https://github.com/stuffmatic/kowalski/blob/master/src/engine/kwl_decoder_imaadpcm.c

ddiakopoulos commented 8 years ago

This is now sitting in a branch https://github.com/ddiakopoulos/libnyquist/tree/adpcm but there's a weird issue I need to track down. It's randomly clipping things when it shouldn't. Also, this decoder will become most useful when libnyquist implements streaming support.

r-lyeh-archived commented 8 years ago

:+1: what adpcm variant is it?

ddiakopoulos commented 8 years ago

IMA-ADPCM (IMA4). This impl is currently working with encoder in Reaper and Audacity. Need to work on my CAF/AIFF decoder (I added a test IMA CAF file to the repo), but that should work transparently once it's online.

ddiakopoulos commented 8 years ago

Sweet! Closing this out. Implementation is fixed and now on master.

r-lyeh-archived commented 8 years ago

:smiley: