From 6188e4d074166ea171d737beb73f5b2ebfaf6934 Mon Sep 17 00:00:00 2001 From: Adolfo Rodrigues Date: Mon, 4 Jul 2022 15:56:16 +0000 Subject: [PATCH] pulse-server: tweak maxlength some more Make the buffer size at least 4 times as large as the fragment size to avoid xruns. --- src/modules/module-protocol-pulse/pulse-server.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/module-protocol-pulse/pulse-server.c b/src/modules/module-protocol-pulse/pulse-server.c index 0d9a550b7..20d243152 100644 --- a/src/modules/module-protocol-pulse/pulse-server.c +++ b/src/modules/module-protocol-pulse/pulse-server.c @@ -678,8 +678,8 @@ static uint32_t fix_record_buffer_attr(struct stream *s, struct buffer_attr *att latency = attr->fragsize; } /* make sure can queue at least to fragsize without overruns */ - if (attr->maxlength < attr->fragsize * 2) - attr->maxlength = attr->fragsize * 2; + if (attr->maxlength < attr->fragsize * 4) + attr->maxlength = attr->fragsize * 4; pw_log_info("[%s] maxlength:%u fragsize:%u minfrag:%u latency:%u", s->client->name, attr->maxlength, attr->fragsize, minfrag,