pulse-server: set record latency as fragsize / 2

The record latency is set to fragsize / 2 by pulseaudio, so do the
same in pipewire.

Fixes #2702
This commit is contained in:
Wim Taymans 2022-09-19 14:45:11 +02:00
parent 94336cb2c9
commit d1cd199f16

View file

@ -685,9 +685,10 @@ static uint64_t fix_record_buffer_attr(struct stream *s, struct buffer_attr *att
if (attr->maxlength < attr->fragsize * 4)
attr->maxlength = attr->fragsize * 4;
latency = attr->fragsize / frame_size;
/* pulseaudio configures half the fragsize as latency in the source. */
latency = attr->fragsize / 2;
lat->num = latency;
lat->num = latency / frame_size;
lat->denom = rate;
clamp_latency(s, lat);