Increase buffering level smoothness

The buffering level does not change continuously: it increases abruptly
when a packet is received, and decreases abruptly when an audio block is
consumed.

To estimate the buffering level, a rolling average is used.

To make the buffering more stable, increase the smoothness of this
rolling average. This decreases the risk of enabling audio compensation
due to an estimation error.
audio_player_atomic.11
Romain Vimont 5 months ago
parent f69afc336a
commit d4a3c7d084

@ -417,7 +417,7 @@ sc_audio_player_frame_sink_open(struct sc_frame_sink *sink,
// Samples are produced and consumed by blocks, so the buffering must be
// smoothed to get a relatively stable value.
sc_average_init(&ap->avg_buffering, 32);
sc_average_init(&ap->avg_buffering, 128);
ap->samples_since_resync = 0;
ap->received = false;

Loading…
Cancel
Save