mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-12-18 08:56:45 -05:00
context: when forcing rate/quantum don't limit latency
Usually, the max-latency is calculated by the device when it is configured based on the maximum buffer size and limits the latency change that can be done. When we are forcing a rate/quantum and we are going to reconfigure the device, this limit should not apply because the current buffer settings and latency are going to change because of the reconfigure. See #3613
This commit is contained in:
parent
e4def0ce18
commit
2ff62641b9
1 changed files with 3 additions and 2 deletions
|
|
@ -1465,8 +1465,9 @@ again:
|
|||
node_max_quantum = node_max_quantum * current_rate / node_rate_quantum;
|
||||
}
|
||||
|
||||
/* calculate desired quantum */
|
||||
if (max_latency.denom != 0) {
|
||||
/* calculate desired quantum. Don't limit to the max_latency when we are
|
||||
* going to force a quantum or rate and reconfigure the nodes. */
|
||||
if (max_latency.denom != 0 && !force_quantum && !force_rate) {
|
||||
uint32_t tmp = (max_latency.num * current_rate / max_latency.denom);
|
||||
if (tmp < node_max_quantum)
|
||||
node_max_quantum = tmp;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue