mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2026-02-18 22:05:40 -05:00
alsa: use graph rate for rate latency
When we recalculate the headroom we also update the latency in frames. We should express this latency in the graph rate. This is usually the rate that is suggested in the target_rate but when we are forcing our own rate (mostly when using IRQ or when in DSD/IEC mode) we should ignore that value and use our own rate that we will force instead. Fixes #4977
This commit is contained in:
parent
4152c5d292
commit
4f39329ca9
1 changed files with 3 additions and 1 deletions
|
|
@ -2036,7 +2036,9 @@ static void recalc_headroom(struct state *state)
|
|||
uint32_t latency;
|
||||
uint32_t rate = 0;
|
||||
|
||||
if (state->position != NULL)
|
||||
if (state->force_quantum && !state->following)
|
||||
rate = state->rate;
|
||||
else if (state->position != NULL)
|
||||
rate = state->position->clock.target_rate.denom;
|
||||
|
||||
if (state->use_period_size_min_as_headroom)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue