When declaring multiple loopbacks, a random one doesn't work most of the time
I'm trying to set up several loopbacks in order to record some applications separately from others. In the most minimal setup, modules look like this:
{
name = libpipewire-module-loopback
args = {
capture.props = {
media.class = Audio/Sink
node.name = voice_sink
node.description = "Voice Sink"
}
}
}
{
name = libpipewire-module-loopback
args = {
capture.props = {
media.class = Audio/Sink
node.name = game_sink
node.description = "Game Sink"
}
}
}
I then use PULSE_SINK=game_sink
to route all games' audio into the game sink and configure my voice communication software to use the voice sink.
So far so logical. However, one of the loopbacks pw creates does not do anything. Its sink and sources are available and nothing looks out of the ordinary but it does not "play back" anything. pavucontrol
's playback tab shows the non-working loopback without a level bar while the other ones have one, even with no output ever having gone through them.
Which loopback it hits seems random but, when creating 3 of them (29, 30, 31) it's either 29 or 31 but never 30 and sometimes all work just fine.
Aside from IDs and names, the loopback outputs' pw-cli info
do not differ.
pipewire
Compiled with libpipewire 0.3.65
Linked with libpipewire 0.3.65
Config are the NixOS defaults: https://github.com/NixOS/nixpkgs/tree/de6e502f5e9e0ae9cb827ca44c1ec344aa97d68b/nixos/modules/services/desktops/pipewire/daemon