mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-04 13:30:12 -05:00
pulse-server: read in chunks of minreq from the ringbuffer
Don't read too large chunks from the ringbuffer but in minreq increments. This is more what pulseaudio does. Fixes #463
This commit is contained in:
parent
d3db703f77
commit
bcf6c0986e
1 changed files with 1 additions and 0 deletions
|
|
@ -1452,6 +1452,7 @@ static void stream_process(void *data)
|
||||||
avail = stream->attr.maxlength;
|
avail = stream->attr.maxlength;
|
||||||
}
|
}
|
||||||
size = SPA_MIN(buf->datas[0].maxsize, (uint32_t)avail);
|
size = SPA_MIN(buf->datas[0].maxsize, (uint32_t)avail);
|
||||||
|
size = SPA_MIN(size, stream->attr.minreq);
|
||||||
|
|
||||||
spa_ringbuffer_read_data(&stream->ring,
|
spa_ringbuffer_read_data(&stream->ring,
|
||||||
stream->buffer, stream->attr.maxlength,
|
stream->buffer, stream->attr.maxlength,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue