Redesign audio playback
Audio playback code in t_audio_tx is very badly designed. Audio device underruns are standard part of the code's lifecycle and are even used to detect jitter buffer emptiness.
This results in crackling sound with PulseAudio. It also makes it very difficult to implement #3 properly.
Correct design should not do any sleeps in the audio thread. It should poll the RTP/decode/jitter logic for more data. If none are given, silence should be generated.
I also recommend only using a fixed sample rate such as 44100 for playback and resample incoming audio via libresample. This makes it easy for injected sounds (DTMF, end of call beep, etc.) to always have the same quality.
I started writing some code in a feature branch 'feature/9'.
It is clear that 3-way conferencing will also need to be reworked from audio perspective. I.e., it will first be removed in this branch and later re-implemented.
Happy anniversary! Anyhting new around here? Pulseaudio is crackling happily for the years past, can't say it's "usable".
The check for libsamplerate needs to be added to CMakeLists.txt
I cherry-picked the two commits from feature/9 to the current master (involves conflict resolution) and the audio-quality improved. Might be a good direction to go, although I would prefer if pulseaudio could be invoked directly.
The check for libsamplerate needs to be added to CMakeLists.txt
I think @LubosD was aware of this. :smirk:
https://github.com/LubosD/twinkle/blob/0fbcea8799ce47ce40b4b43944ff36c7fb996e9a/CMakeLists.txt#L28