samplerate.c: Allow transcoding to lower sample rate other than 8000 Hz

This commit is contained in:
Andreas Eversberg
2017-03-04 16:52:20 +01:00
parent 3fc4fc54be
commit 8e0d7d2513
5 changed files with 14 additions and 16 deletions

View File

@@ -134,7 +134,7 @@ int dsp_init_sender(cnetz_t *cnetz, int measure_speed, double clock_speed[2])
}
/* reinit the sample rate to shrink/expand audio */
init_samplerate(&cnetz->sender.srstate, (double)cnetz->sender.samplerate / 1.1); /* 66 <-> 60 */
init_samplerate(&cnetz->sender.srstate, 0x8000, (double)cnetz->sender.samplerate / 1.1); /* 66 <-> 60 */
rc = fsk_fm_init(&cnetz->fsk_demod, cnetz, cnetz->sender.samplerate, (double)BITRATE / (1.0 + clock_speed[0] / 1000000.0));
if (rc < 0)