Draft: Add audio-group utils to group audio streams
This MR allows grouping audio streams that have a well known pw-audio-namespace
ancestor process name. The idea is to support audio "namespaces" so that users can easily change the volume of a set of audio nodes that are part of the same process tree, and also redirect them to a different device all at once.
The grouping is done by creating a loopback filter for each group or namespace. Those loopback filters are then linked in between the actual stream and device nodes. A '--target-node-id' flag is also supported in the ancestor pw-audio-namespace
process name to define a target for the loopback stream node.
For example, if you have an executable that is able to launch other executables (such as this tool), you can rename the executable to pw-audio-namespace
and execute audacious
like this:
./pw-audio-namespace -- audacious test.wav
In this case, since the executable has the pw-audio-namespace
name, a loopback filter will be created and linked in between all audacious stream nodes and the audio sink device, grouping them together. You can also specify the target of the loopback node using the --target-node-id flag. For example:
./pw-audio-namespace --target-node-id 42 -- audacious test.wav