dbry / adpcm-xq

Xtreme Quality IMA-ADPCM Encoder / Decoder
BSD 3-Clause "New" or "Revised" License
214 stars 46 forks source link

Arduino and cmake support #13

Closed pschatzmann closed 1 year ago

pschatzmann commented 1 year ago

I made the following changes:

pschatzmann commented 1 year ago

I provide some intregration of your library in my Arduino AudioTools:

dbry commented 1 year ago

Hey thanks, this nice! I have never tried out an Arduino, although I have used ESP32's and tons of RPi's.

I tried the cmake file and it doesn't seem to generate an executable (just the library). Is that easy to add? I guess it wouldn't make sense on an Arduino, but certainly on some other platforms.

pschatzmann commented 1 year ago

Good point: I extended the cmake to build both, an executable and the library.

On the ESP32 it seems to work only with LOOKAHEAD 0 and NOISE_SHAPING_OFF

dbry commented 1 year ago

Good point: I extended the cmake to build both, an executable and the library.

Great!

On the ESP32 it seems to work only with LOOKAHEAD 0 and NOISE_SHAPING_OFF

I don't explicitly mention this, but the encoder is really not intended as an embedded target. It achieves the quality through a lot of complex and costly stuff, including possibly deep recursion. The idea is that the encoding would be done offline to generate canned audio. The decoder, on the other hand, is very embedded-friendly. I'm not why the noise shaping would not work as that's pretty simple.

That said, if the encoder is used without lookahead, then it should be fine.