filter-chain: add mixer sink example

This commit is contained in:
Wim Taymans 2022-07-08 16:28:12 +02:00
parent 3a8275427e
commit 9861e0f5f5
2 changed files with 46 additions and 5 deletions

View file

@ -0,0 +1,39 @@
# An example filter chain that makes a stereo sink that mixes
# the FL and FR channels to a single FL channel
#
# Copy this file into a conf.d/ directory
#
context.modules = [
{ name = libpipewire-module-filter-chain
args = {
node.description = "Mix example"
media.name = "Mix example"
filter.graph = {
nodes = [
{
name = mix
type = builtin
label = mixer
control = {
"Gain 1" = 0.5
"Gain 2" = 0.5
}
}
]
inputs = [ "mix:In 1" "mix:In 2" ]
outputs = [ "mix:Out" ]
}
capture.props = {
node.name = "mix_input.mix-FL-FR-to-FL"
audio.position = [ FL FR ]
media.class = "Audio/Sink"
}
playback.props = {
node.name = "mix_output.mix-FL-FR-to-FL"
audio.position = [ FL ]
stream.dont-remix = true
node.passive = true
}
}
}
]

View file

@ -1,4 +1,4 @@
# An example filter chain for duplicating the FL channel # An example filter chain that makes a source that duplicates the FL channel
# to FL and FR. # to FL and FR.
# #
# Copy this file into a conf.d/ directory # Copy this file into a conf.d/ directory
@ -39,10 +39,12 @@ context.modules = [
node.name = "remap_input.remap-FL-to-FL-FR" node.name = "remap_input.remap-FL-to-FL-FR"
audio.position = [ FL ] audio.position = [ FL ]
stream.dont-remix = true stream.dont-remix = true
node.passive = true
} }
playback.props = { playback.props = {
node.name = "remap_output.remap-FL-to-FL-FR" node.name = "remap_output.remap-FL-to-FL-FR"
audio.position = [ FL FR ] audio.position = [ FL FR ]
media.class = "Audio/Source"
} }
} }
} }