mirror of
https://gitlab.freedesktop.org/pipewire/pipewire
synced 2024-09-06 08:45:44 +00:00
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:
parent
94336cb2c9
commit
d1cd199f16
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in a new issue