# PipeWire drop-in for the headless punktfunk host: a virtual "Punktfunk" speaker.
#
# A headless streaming host has no real speakers — desktop audio should go to a sink the host
# captures and streams to the client, not to whatever PipeWire picked (on a LAN with AirPlay
# devices that's often a random HomePod). This null sink is that capture target; its high
# priority.session makes WirePlumber select it as the default output, so apps play to it, the host
# captures its monitor (audio/linux.rs, stream.capture.sink), and the client hears the desktop.
#
# Copied to ~/.config/pipewire/pipewire.conf.d/ by run-headless-kde.sh. Pair with disabling RAOP
# (remove the pipewire-config-raop package / its 50-raop.conf symlink) so AirPlay devices don't
# show up as outputs at all. NB: a null sink is a `support.null-audio-sink` adapter object — NOT
# `libpipewire-module-null-sink`, which doesn't exist on PipeWire 1.x and makes the daemon refuse
# to start (mandatory-module load failure).
context.objects = [
    {   factory = adapter
        args = {
            factory.name     = support.null-audio-sink
            node.name        = "punktfunk"
            node.description  = "Punktfunk"
            media.class      = "Audio/Sink"
            object.linger    = true
            audio.position   = [ FL FR ]
            priority.session = 2000
        }
    }
]
