From 63a34f4f844388bb64a490ba206e1944047a28c8 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Tue, 9 Mar 2021 15:46:44 +0100 Subject: [PATCH] alsa: after XRun, fill with previous threshold It is possible that the quantum has changed before the xrun and then we will assume the previous quantum was in the device. --- spa/plugins/alsa/alsa-pcm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spa/plugins/alsa/alsa-pcm.c b/spa/plugins/alsa/alsa-pcm.c index 847b627f1..88a48a821 100644 --- a/spa/plugins/alsa/alsa-pcm.c +++ b/spa/plugins/alsa/alsa-pcm.c @@ -803,7 +803,7 @@ recover: state->alsa_started = false; if (state->stream == SND_PCM_STREAM_PLAYBACK) - spa_alsa_silence(state, state->threshold + state->headroom); + spa_alsa_silence(state, state->last_threshold + state->headroom); return do_start(state); }