ha7ilm / csdr

A simple DSP library and command-line tool for Software Defined Radio.
522 stars 171 forks source link

using csdr encode_ima_adpcm and decode_ima_adpcm_u8_i16 #32

Closed diazm closed 6 years ago

diazm commented 6 years ago

Hi, about the IMA ADPCM encode and decode, I am trying to chain and play using pipes. In my first attempt use play nc -l -u 7355 | csdr encode_ima_adpcm_i16_u8 | play -tima -r8k -

The input source has a 8kHz sample rate and the input format is signed short to encode_ima_adpcm but the sound is a bit distorted after decoded (using play), so my question here is: does the input source need a particular sample rate to use with csdr encode_ima_adpcm_i16_u8 ?

In the othe side if I want to use csdr encode and csdr decode which player do you recommend (play, mplayer) and how would be the parameters?, . It is something li ke this: nc -l -u 7355 | csdr encode_ima_adpcm_i16_u8 | csdr decode_ima_adpcm_u8_i16 | mplayer...

Thanks and regards

ha7ilm commented 6 years ago

does the input source need a particular sample rate to use with csdr encode_ima_adpcm_i16_u8 ?

No.

You could try to use gain_ff.

IMA ADPCM causes some decrease in dynamic range anyway.

Both aplay and mplayer should work, you can find the parameters in their man pages.

diazm commented 6 years ago

ok, thanks for the tip.