mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
impl-node: sync current rate and quantum with position
This commit is contained in:
parent
dbe61af543
commit
c903c2ca08
1 changed files with 6 additions and 0 deletions
|
|
@ -658,6 +658,9 @@ static void update_io(struct pw_impl_node *node)
|
|||
sizeof(struct spa_io_position)) >= 0) {
|
||||
pw_log_debug("%p: set position %p", node, &node->rt.activation->position);
|
||||
node->rt.position = &node->rt.activation->position;
|
||||
|
||||
node->current_rate = node->rt.position->clock.rate;
|
||||
node->current_quantum = node->rt.position->clock.duration;
|
||||
} else if (node->driver) {
|
||||
pw_log_warn("%p: can't set position on driver", node);
|
||||
}
|
||||
|
|
@ -780,6 +783,9 @@ do_move_nodes(struct spa_loop *loop,
|
|||
pw_log_trace("%p: set position %p", node, &driver->rt.activation->position);
|
||||
node->rt.position = &driver->rt.activation->position;
|
||||
|
||||
node->current_rate = node->rt.position->clock.rate;
|
||||
node->current_quantum = node->rt.position->clock.duration;
|
||||
|
||||
if (node->source.loop != NULL) {
|
||||
remove_node(node);
|
||||
add_node(node, driver);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue