common code: Sample rate conversion now supports any rate above 8000 Hz

This commit is contained in:
Andreas Eversberg
2016-04-17 15:17:38 +02:00
parent 05402283df
commit 9de121109d
6 changed files with 33 additions and 80 deletions

View File

@@ -1450,7 +1450,7 @@ void call_rx_audio(int callref, int16_t *samples, int count)
return;
if (nmt->dsp_mode == DSP_MODE_AUDIO || nmt->dsp_mode == DSP_MODE_DTMF) {
int16_t up[count * nmt->sender.srstate.factor];
int16_t up[(int)((double)count * nmt->sender.srstate.factor + 0.5) + 10];
if (nmt->compander)
compress_audio(&nmt->cstate, samples, count);
count = samplerate_upsample(&nmt->sender.srstate, samples, count, up);