- fix bad audio quality
This commit is contained in:
@@ -27,8 +27,10 @@
|
|||||||
#define AUDIO_MIX_CHANNEL_COUNT 16
|
#define AUDIO_MIX_CHANNEL_COUNT 16
|
||||||
#define AUDIO_DEVICEPAIR_INPUTBUFFER 16384
|
#define AUDIO_DEVICEPAIR_INPUTBUFFER 16384
|
||||||
|
|
||||||
// Avoid too high resampler quality - it can take many CPU and cause gaps in playing
|
// Resampler quality on the Speex 0..10 scale. Quality 1 upsampling (e.g. G.711 8k -> 48k)
|
||||||
#define AUDIO_RESAMPLER_QUALITY 1
|
// adds audible aliasing and hurts PVQA/AQuA scores; 7 is a good fidelity/CPU balance for a
|
||||||
|
// single mono stream on modern ARM64. Raise toward 10 for max fidelity if CPU allows.
|
||||||
|
#define AUDIO_RESAMPLER_QUALITY 7
|
||||||
#define AEC_FRAME_TIME 10
|
#define AEC_FRAME_TIME 10
|
||||||
#define AEC_TAIL_TIME 160
|
#define AEC_TAIL_TIME 160
|
||||||
|
|
||||||
|
|||||||
@@ -381,6 +381,12 @@ AudioReceiver::AudioReceiver(const CodecList::Settings& settings, MT::Statistics
|
|||||||
// Avoid collecting too much data
|
// Avoid collecting too much data
|
||||||
mRtpBuffer.setHigh(240ms);
|
mRtpBuffer.setHigh(240ms);
|
||||||
|
|
||||||
|
// Keep a non-zero low-water cushion. With low-water at 0 the buffer drains all the way to
|
||||||
|
// empty before reacting, so ordinary clock drift / jitter periodically starves the decoder
|
||||||
|
// and forces silence/PLC insertion (heard as periodic artifacts, uncounted by rtp_lost /
|
||||||
|
// rtp_dropped). Holding ~60ms lets a late packet arrive before the buffer underruns.
|
||||||
|
mRtpBuffer.setLow(60ms);
|
||||||
|
|
||||||
// Resamplers are lazy inside; there is no actual memory allocation
|
// Resamplers are lazy inside; there is no actual memory allocation
|
||||||
mResampler8.start(AUDIO_CHANNELS, 8000, AUDIO_SAMPLERATE);
|
mResampler8.start(AUDIO_CHANNELS, 8000, AUDIO_SAMPLERATE);
|
||||||
mResampler16.start(AUDIO_CHANNELS, 16000, AUDIO_SAMPLERATE);
|
mResampler16.start(AUDIO_CHANNELS, 16000, AUDIO_SAMPLERATE);
|
||||||
|
|||||||
Reference in New Issue
Block a user