From cb91d7a12e6be0e2c720d47d2ceca322a7b21d2c Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Sun, 26 Apr 2020 19:55:08 +0200 Subject: [PATCH] alsa-sink: increase watermark when there is nothing to rewind If we do not manage to rewind at all because there is nothing to rewind any more, it means the latency is too small, and we let audio escape our control. We should thus increase the watermark to fix this. Fixes #871 Part-of: --- src/modules/alsa/alsa-sink.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/modules/alsa/alsa-sink.c b/src/modules/alsa/alsa-sink.c index f7fef8a7e..bd8377ced 100644 --- a/src/modules/alsa/alsa-sink.c +++ b/src/modules/alsa/alsa-sink.c @@ -1877,8 +1877,11 @@ static int process_rewind(struct userdata *u) { u->after_rewind = true; return 0; } - } else + } else { pa_log_debug("Mhmm, actually there is nothing to rewind."); + if (u->use_tsched) + increase_watermark(u); + } rewind_done: pa_sink_process_rewind(u->sink, 0);