Skip to content

A hardened Linux desktop, rebuilt from scratch, with your Windows apps built in. Free and open source.

1.7 KB
Raw Blame
# Mono audio (Settings > Accessibility): one filter that every app's sound
# passes through on its way to the speakers or headphones in use. Its input
# has a single channel, so PipeWire mixes left and right together going in,
# and its single channel output is spread back over both sides of the
# device. WirePlumber's smart filter policy puts it in front of whichever
# output is the default and follows a change of device; it is never chosen
# as the default itself (it has no session priority).
#
# Run by wildos-mono-audio.service as a PipeWire client of its own, like
# PipeWire's filter-chain service, so switching it on or off never restarts
# PipeWire.

context.properties = {
    log.level = 0
}

context.spa-libs = {
    audio.convert.* = audioconvert/libspa-audioconvert
    support.*       = support/libspa-support
}

context.modules = [
    { name = libpipewire-module-rt
        args = { }
        flags = [ ifexists nofail ]
    }
    { name = libpipewire-module-protocol-native }
    { name = libpipewire-module-client-node }
    { name = libpipewire-module-adapter }
    { name = libpipewire-module-loopback
        args = {
            node.description = "Mono audio"
            capture.props = {
                node.name = "wildos-mono-audio"
                media.class = "Audio/Sink"
                audio.position = [ MONO ]
                priority.session = 0
                priority.driver = 0
                filter.smart = true
                filter.smart.name = "wildos-mono-audio"
            }
            playback.props = {
                node.name = "wildos-mono-audio.output"
                audio.position = [ MONO ]
                node.passive = true
            }
        }
    }
]