mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
alsa: only recompute threshold when quantum changes
This commit is contained in:
parent
dd0342167f
commit
aa0e0043d3
1 changed files with 1 additions and 1 deletions
|
|
@ -1340,7 +1340,7 @@ static void alsa_on_timeout_event(struct spa_source *source)
|
|||
if (SPA_UNLIKELY(state->started && spa_system_timerfd_read(state->data_system, state->timerfd, &expire) < 0))
|
||||
spa_log_warn(state->log, NAME" %p: error reading timerfd: %m", state);
|
||||
|
||||
if (SPA_LIKELY(state->position)) {
|
||||
if (SPA_UNLIKELY(state->position && state->duration != state->position->clock.duration)) {
|
||||
state->duration = state->position->clock.duration;
|
||||
state->threshold = (state->duration * state->rate + state->rate_denom-1) / state->rate_denom;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue