[Desktop] Refactor configuration

This commit is contained in:
Antoine Viallon 2023-03-15 09:22:48 +01:00
parent cff1f34d05
commit b9dbcfd715
Signed by: aviallon
GPG key ID: 186FC35EDEB25716
8 changed files with 277 additions and 247 deletions

View file

@ -1,61 +0,0 @@
{ lib
, writeText
, rnnoise-plugin
, noiseFilterStrength
}:
writeText "pipewire-noise-filter.cfg" ''
# Noise canceling source
#
# start with pipewire -c filter-chain/source-rnnoise.conf
#
context.properties = {
log.level = 0
}
context.spa-libs = {
audio.convert.* = audioconvert/libspa-audioconvert
support.* = support/libspa-support
}
context.modules = [
{ name = libpipewire-module-rtkit
args = {
#nice.level = -11
#rt.prio = 88
#rt.time.soft = 200000
#rt.time.hard = 200000
}
flags = [ ifexists nofail ]
}
{ name = libpipewire-module-protocol-native }
{ name = libpipewire-module-client-node }
{ name = libpipewire-module-adapter }
{ name = libpipewire-module-filter-chain
args = {
node.name = "rnnoise_source"
node.description = "Noise Canceling source"
media.name = "Noise Canceling source"
filter.graph = {
nodes = [
{
type = ladspa
name = rnnoise
plugin = ${rnnoise-plugin}/lib/ladspa/librnnoise_ladspa.so
label = noise_suppressor_stereo
control = {
"VAD Threshold (%)" ${toString noiseFilterStrength}
}
}
]
}
capture.props = {
node.passive = true
}
playback.props = {
media.class = Audio/Source
}
}
}
]''