Pipewire Loopback Config
I was having a lot of trouble routing audio between programs on Linux.
Pretty sure this is the wrong way to go about it.
But it works, and I want to write it down somewhere if I need to do it again :-)
I’m sure these config files are meant to go into your home directory…
/etc/pipewire/pipewire.conf.d/11-loopback-devices.conf
context.modules = [
{
name = libpipewire-module-loopback
args = {
audio.position = [ FL FR ]
capture.props = {
media.class = "Audio/Sink"
node.name = "loopback-sink-1"
node.description = "Loopback Virtual Sink 1"
device.description = "Loopback Virtual Sink 1"
device.class = "sound"
device.icon-name = "audio-card"
node.virtual = false
}
playback.props = {
media.class "Audio/Source"
node.name = "loopback-sink-1.output"
node.description = "Loopback Virtual Source 1"
device.description = "Loopback Virtual Source 1"
device.class = "sound"
device.icon-name = "audio-card"
node.passive = true
}
}
}
]
/etc/pipewire/pipewire.conf.d/12-loopback-devices.conf
context.modules = [
{
name = libpipewire-module-loopback
args = {
audio.position = [ FL FR ]
capture.props = {
media.class = "Audio/Sink"
node.name = "loopback-sink-2"
node.description = "Loopback Virtual Sink 2"
device.description = "Loopback Virtual Sink 2"
device.class = "sound"
device.icon-name = "audio-card"
node.virtual = false
}
playback.props = {
media.class "Audio/Source"
node.name = "loopback-sink-2.output"
node.description = "Loopback Virtual Source 2"
device.description = "Loopback Virtual Source 2"
device.class = "sound"
device.icon-name = "audio-card"
node.passive = true
}
}
}
]
And to restart:
systemctl restart --user pipewire
