From cf1d09d0cc2926b21e412dabd3757b4b572081e8 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Tue, 14 Dec 2021 10:21:11 +0100 Subject: [PATCH] Revert "pulse-server: always ask for more data when underrun" This reverts commit e1576c53d495dcafe5272cc0176d00d55f539c76. This is not quite right, it seems to break orca and qemu audio. See #1900 --- src/modules/module-protocol-pulse/pulse-server.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/src/modules/module-protocol-pulse/pulse-server.c b/src/modules/module-protocol-pulse/pulse-server.c index 3d544b63e..22cb477f5 100644 --- a/src/modules/module-protocol-pulse/pulse-server.c +++ b/src/modules/module-protocol-pulse/pulse-server.c @@ -1246,16 +1246,14 @@ static void stream_process(void *data) pd.underrun_for = size; pd.underrun = true; } - if (!stream->corked) { + if (stream->attr.prebuf == 0 && !stream->corked) { pd.missing = size; - if (stream->attr.prebuf == 0) { - pd.playing_for = size; - if (avail > 0) { - index += avail; - pd.read_inc = avail; - } - spa_ringbuffer_read_update(&stream->ring, index); + pd.playing_for = size; + if (avail > 0) { + index += avail; + pd.read_inc = avail; } + spa_ringbuffer_read_update(&stream->ring, index); } pw_log_debug("%p: [%s] underrun read:%u avail:%d max:%u", stream, client->name, index, avail, minreq);