mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-31 22:25:38 -04:00
pulse-server: enforce minfrag after latency adjust
This commit is contained in:
parent
0079a1d5bc
commit
b70f32a259
1 changed files with 2 additions and 1 deletions
|
|
@ -666,7 +666,6 @@ 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
|
||||
|
|
@ -676,6 +675,8 @@ 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 */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue