# A virtual sound source sink
# Useful for testing spatial effects by moving it around with controls
#
# Copy this file into a conf.d/ directory such as
# ~/.config/pipewire/filter-chain.conf.d/
#
context.modules = [
    { name = libpipewire-module-filter-chain
        args = {
            node.description = "3D Sink"
            media.name       = "3D Sink"
            filter.graph = {
                nodes = [
                    {
                        type = sofa
                        label = spatializer
                        name = sp
                        config = {
                            filename = "~/.config/hrtf-sofa/hrtf b_nh724.sofa"
                        }
                        control = {
                            "Azimuth"    = 220.0
                            "Elevation"  = 0.0
                            "Radius"     = 3.0
                        }
                    }
                ]
                inputs  = [ "sp:In" ]
                outputs = [ "sp:Out L" "sp:Out R" ]
            }
            capture.props = {
                node.name      = "effect_input.3d"
                media.class    = Audio/Sink
                audio.channels = 1
                audio.position = [ FC ]
            }
            playback.props = {
                node.name      = "effect_output.3d"
                node.passive   = true
                audio.channels = 2
                audio.position = [ FL FR ]
            }
        }
    }
]
