pipewire/pipewire-jack
Wim Taymans 46f71b1cd2 Rework how targets are managed
Manage them like we do on the client and reuse logic. Make a node
function to safely add and remove a target.

Activate the targets from the process loop when we can be sure that we
can resume them. This avoids incrementing the pending state when we are
not going to be able to resume the nodes (like when the cycle is ongoing
and we have already been scheduled) and avoids glitches and xruns.

When a node is added to the poll loop, it can activate its own targets.
This is mostly for driver so that they have something to schedule and
can then activate the other targets.

Try to resume the target when it is removed and we are supposed to be
scheduled.

Also add targets to the target_list when the node is remote to make sure
the profiler can see the targets as well.

Keep the node in the INACTIVE state as long as the eventfd of the node
is not added to the loop. Skip nodes in the INACTIVE state from going to
the NOT_TRIGGERED status, which avoids scheduling the node.

Make sure we remove any local targets we have in a node when we export
it, we will receive new targets from the server.

This should eliminate any glitches when adding and removing nodes from
the graph.

See #4026, #2468
2024-06-05 15:37:15 +02:00
..
examples treewide: use SPDX tags to specify copyright information 2023-02-16 10:54:48 +00:00
jack Update FSF address 2023-08-07 09:36:59 +00:00
src Rework how targets are managed 2024-06-05 15:37:15 +02:00
meson.build [Meson] Change jack-devel option to be boolean 2021-08-06 07:56:16 +00:00