Audio rework, new jitter buffer

Jitter buffer is now based on packets, not on samples. The frames are
dejittered in received form. After reading from jitter buffer, they are
decoded in correct order. If a frame is missing, it is concealed by
repeating audio.
This commit is contained in:
Andreas Eversberg
2024-03-10 13:45:08 +01:00
parent e7efcee289
commit a20637825a
40 changed files with 865 additions and 572 deletions

View File

@@ -1080,28 +1080,6 @@ void call_down_release(int callref, int cause)
}
}
/* Receive audio from call instance. */
void call_down_audio(int callref, uint16_t sequence, uint32_t timestamp, uint32_t ssrc, sample_t *samples, int count)
{
sender_t *sender;
amps_t *amps;
for (sender = sender_head; sender; sender = sender->next) {
amps = (amps_t *) sender;
if (amps->trans_list && amps->trans_list->callref == callref)
break;
}
if (!sender)
return;
if (amps->dsp_mode == DSP_MODE_AUDIO_RX_AUDIO_TX) {
compress_audio(&amps->cstate, samples, count);
jitter_save(&amps->sender.dejitter, samples, count, 1, sequence, timestamp, ssrc);
}
}
void call_down_clock(void) {}
/* Timeout handling */
void transaction_timeout(void *data)
{