From 72ce2f815b15a898287f143ba3b87503c08ec9cc Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Mon, 5 Sep 2022 16:18:34 +0200 Subject: [PATCH] Revert "pulse-server: enforce minfrag after latency adjust" This reverts commit b70f32a2593dfcc46713ae8fc577de80df40c1ab. --- src/modules/module-protocol-pulse/pulse-server.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/modules/module-protocol-pulse/pulse-server.c b/src/modules/module-protocol-pulse/pulse-server.c index e1df8476f..ff7e1e995 100644 --- a/src/modules/module-protocol-pulse/pulse-server.c +++ b/src/modules/module-protocol-pulse/pulse-server.c @@ -666,6 +666,7 @@ static uint32_t fix_record_buffer_attr(struct stream *s, struct buffer_attr *att attr->fragsize = frac_to_bytes_round_up(s->default_frag, &s->ss); attr->fragsize = SPA_MIN(attr->fragsize, attr->maxlength); attr->fragsize = SPA_ROUND_UP(attr->fragsize, frame_size); + attr->fragsize = SPA_MAX(attr->fragsize, minfrag); /* pulseaudio configures the source to half of the fragsize. It also * immediately sends chunks to clients. Configure a 2/3 of the fragsize @@ -675,8 +676,6 @@ static uint32_t fix_record_buffer_attr(struct stream *s, struct buffer_attr *att if (s->adjust_latency) attr->fragsize = SPA_ROUND_UP(latency, frame_size); - attr->fragsize = SPA_MAX(attr->fragsize, minfrag); - attr->tlength = attr->prebuf = 0; /* make sure can queue at least to fragsize without overruns */