mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-03 09:01:54 -05:00
pulse-server: calculate buffer size based on the frame size
Audio with big frame sizes (especially audio with multiple channels) needs more buffer size than the one calculated with the current formula. This patch uses the frame size to calculate the buffer size, fixing playback issues for clients configured in passthrough mode.
This commit is contained in:
parent
b136bb8ca5
commit
d4b06431ff
1 changed files with 2 additions and 2 deletions
|
|
@ -963,8 +963,8 @@ static const struct spa_pod *get_buffers_param(struct stream *s,
|
|||
stride = s->frame_size;
|
||||
|
||||
if (s->direction == PW_DIRECTION_OUTPUT) {
|
||||
maxsize = attr->tlength * 4;
|
||||
size = attr->minreq * 2;
|
||||
maxsize = attr->tlength * s->frame_size;
|
||||
size = attr->minreq * s->frame_size;
|
||||
} else {
|
||||
size = attr->fragsize;
|
||||
maxsize = attr->fragsize * MAX_BUFFERS;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue