Revert "pulse-server: always asks for more data when underrun"

This reverts commit 1b94b66924.

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.
This commit is contained in:
Wim Taymans 2021-12-09 16:53:29 +01:00
parent 6b34b8c44e
commit 7e5a0849f6

View file

@ -1247,6 +1247,7 @@ static void stream_process(void *data)
pd.underrun = true; pd.underrun = true;
} }
if (stream->attr.prebuf == 0 && !stream->corked) { if (stream->attr.prebuf == 0 && !stream->corked) {
pd.missing = size;
pd.playing_for = size; pd.playing_for = size;
if (avail > 0) { if (avail > 0) {
index += avail; index += avail;
@ -1254,9 +1255,8 @@ static void stream_process(void *data)
} }
spa_ringbuffer_read_update(&stream->ring, index); spa_ringbuffer_read_update(&stream->ring, index);
} }
pd.missing = size; pw_log_debug("%p: [%s] underrun read:%u avail:%d max:%u",
pw_log_debug("%p: [%s] underrun read:%u avail:%d max:%u size:%u missing:%u", stream, client->name, index, avail, minreq);
stream, client->name, index, avail, minreq, size, pd.missing);
} else { } else {
if (avail > (int32_t)stream->attr.maxlength) { if (avail > (int32_t)stream->attr.maxlength) {
uint32_t skip = avail - stream->attr.maxlength; uint32_t skip = avail - stream->attr.maxlength;