jack: recompute latencies after graph changes

This commit is contained in:
Wim Taymans 2021-12-07 12:19:25 +01:00
parent b71f47448c
commit 35cec1cf23

View file

@ -2393,6 +2393,7 @@ static int client_node_port_set_mix_info(void *object,
l->port_link.dst, l->port_link.dst_idx); l->port_link.dst, l->port_link.dst_idx);
do_callback(c, connect_callback, do_callback(c, connect_callback,
l->port_link.src_idx, l->port_link.dst_idx, 1, c->connect_arg); l->port_link.src_idx, l->port_link.dst_idx, 1, c->connect_arg);
recompute_latencies(c);
do_callback(c, graph_callback, c->graph_arg); do_callback(c, graph_callback, c->graph_arg);
} }
@ -2895,8 +2896,10 @@ static void registry_event_global(void *data, uint32_t id,
} }
break; break;
} }
if (graph_changed) if (graph_changed) {
recompute_latencies(c);
do_callback(c, graph_callback, c->graph_arg); do_callback(c, graph_callback, c->graph_arg);
}
exit: exit:
return; return;
@ -2959,8 +2962,10 @@ static void registry_event_global_remove(void *object, uint32_t id)
o->port_link.src, o->port_link.dst); o->port_link.src, o->port_link.dst);
break; break;
} }
if (graph_changed) if (graph_changed) {
recompute_latencies(c);
do_callback(c, graph_callback, c->graph_arg); do_callback(c, graph_callback, c->graph_arg);
}
/* JACK clients expect the objects to hang around after /* JACK clients expect the objects to hang around after
* they are unregistered. We keep the memory around for that * they are unregistered. We keep the memory around for that