mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
context: take current target when not updated
When we don't have a pending target duration/rate update, take the currently configured clock target duration/rate as the target rate. This needs to be done when the driver refuses to update the duration and rate for some reason and places its own values in clock target duration/rate. Otherwise we would think the driver is using some other duration than what it is really using. Try: - set alsa to irq based playback that refuses to change the quantum - paplay with some file that sets the quantum to 1024 - pw-metadata -n settings 0 clock.force-quantum 256 - the target duration will be set to 256 but alsa doesn't change it - stop playback - start playback again, the quantum is still 1024 and not 256
This commit is contained in:
parent
b5c3f21792
commit
4e1c64df19
1 changed files with 3 additions and 0 deletions
|
|
@ -1496,6 +1496,9 @@ again:
|
|||
n->rt.position->clock.rate = n->target_rate;
|
||||
}
|
||||
n->target_pending = false;
|
||||
} else {
|
||||
n->target_quantum = n->rt.position->clock.target_duration;
|
||||
n->target_rate = n->rt.position->clock.target_rate;
|
||||
}
|
||||
|
||||
pw_log_debug("%p: driver %p running:%d runnable:%d quantum:%u '%s'",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue