From 7e5a0849f6f722ed8fccfd77bc1891259818e860 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Thu, 9 Dec 2021 16:53:29 +0100 Subject: [PATCH] Revert "pulse-server: always asks for more data when underrun" This reverts commit 1b94b66924256c3321f947129efbca200a7d4e04. It causes problems with qemu. Without this patch, paplay --latency-msec=1 /some.wav hangs when forcing the quantum to 8192. A different fix will be needed. --- src/modules/module-protocol-pulse/pulse-server.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/modules/module-protocol-pulse/pulse-server.c b/src/modules/module-protocol-pulse/pulse-server.c index 1776556f6..22cb477f5 100644 --- a/src/modules/module-protocol-pulse/pulse-server.c +++ b/src/modules/module-protocol-pulse/pulse-server.c @@ -1247,6 +1247,7 @@ static void stream_process(void *data) pd.underrun = true; } if (stream->attr.prebuf == 0 && !stream->corked) { + pd.missing = size; pd.playing_for = size; if (avail > 0) { index += avail; @@ -1254,9 +1255,8 @@ static void stream_process(void *data) } spa_ringbuffer_read_update(&stream->ring, index); } - pd.missing = size; - pw_log_debug("%p: [%s] underrun read:%u avail:%d max:%u size:%u missing:%u", - stream, client->name, index, avail, minreq, size, pd.missing); + pw_log_debug("%p: [%s] underrun read:%u avail:%d max:%u", + stream, client->name, index, avail, minreq); } else { if (avail > (int32_t)stream->attr.maxlength) { uint32_t skip = avail - stream->attr.maxlength;