mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-02 09:01:50 -05:00
alsa: clamp threshold to configured max
This commit is contained in:
parent
75a18d5c7f
commit
8f41031933
2 changed files with 4 additions and 2 deletions
|
|
@ -503,7 +503,8 @@ impl_node_port_use_buffers(struct spa_node *node,
|
|||
spa_log_error(this->log, NAME " %p: need mapped memory", this);
|
||||
return -EINVAL;
|
||||
}
|
||||
this->threshold = d[0].maxsize / this->frame_size;
|
||||
this->threshold = SPA_MIN(d[0].maxsize / this->frame_size,
|
||||
this->props.max_latency);
|
||||
}
|
||||
this->n_buffers = n_buffers;
|
||||
|
||||
|
|
|
|||
|
|
@ -525,7 +525,8 @@ impl_node_port_use_buffers(struct spa_node *node,
|
|||
}
|
||||
spa_list_append(&this->free, &b->link);
|
||||
|
||||
this->threshold = d[0].maxsize / this->frame_size;
|
||||
this->threshold = SPA_MIN(d[0].maxsize / this->frame_size,
|
||||
this->props.max_latency);
|
||||
}
|
||||
this->n_buffers = n_buffers;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue