Skip to content

Draft: Add audio-group utils to group audio streams

Julian Bouzas requested to merge julian/wireplumber:audio-group into master

This MR adds an audio-group-utils.lua utility script that groups audio stream nodes that have a common ancestor process name, and optionally a specific argument. 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 group or namespace, and also redirect them to a different device all at once.

The option can be enabled for specific streams by setting the session.audio-group.process-name and session.audio-group.process-argument properties under the stream.rules section of the configuration. For example, this will group all output streams that have the bash process ancestor with the --restricted argument:

stream.rules = [
  {
    matches = [
      {
          media.class = "Stream/Output/Audio"
      }
    ]
    actions = {
      update-props = {
        session.audio-group.process-name = "bash"
        session.audio-group.process-argument = "--restricted"
      }
    }
  }
]
Edited by Julian Bouzas

Merge request reports

Loading