Refactoring jitter buffer
Features are: * Packet based buffer * Random in, first out * Adaptive delay compensation (voice) * Fixed delay (data, optionally MODEM/FAX) * Interpolation of missing frames * Any sample size
This commit is contained in:
@@ -1954,7 +1954,7 @@ void call_down_release(int callref, int __attribute__((unused)) cause)
|
||||
}
|
||||
|
||||
/* Receive audio from call instance. */
|
||||
void call_down_audio(int callref, sample_t *samples, int count)
|
||||
void call_down_audio(int callref, uint16_t sequence, uint32_t timestamp, uint32_t ssrc, sample_t *samples, int count)
|
||||
{
|
||||
transaction_t *trans;
|
||||
nmt_t *nmt;
|
||||
@@ -1967,11 +1967,9 @@ void call_down_audio(int callref, sample_t *samples, int count)
|
||||
return;
|
||||
|
||||
if (nmt->dsp_mode == DSP_MODE_AUDIO || nmt->dsp_mode == DSP_MODE_DTMF) {
|
||||
sample_t up[(int)((double)count * nmt->sender.srstate.factor + 0.5) + 10];
|
||||
if (nmt->compandor)
|
||||
compress_audio(&nmt->cstate, samples, count);
|
||||
count = samplerate_upsample(&nmt->sender.srstate, samples, count, up);
|
||||
jitter_save(&nmt->sender.dejitter, up, count);
|
||||
jitter_save(&nmt->sender.dejitter, samples, count, 1, sequence, timestamp, ssrc);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user