Audio normalization with ladspa and a filter chain
- PipeWire version: libpipewire 1.0.3
- Distribution: Arch Linux
- Desktop Environment: Stump WM
- Kernel version: 6.7.6
Description of Problem:
I am new to filter chains. When attempting to setup volume normalizing using ladspa in a filter chain, the Sink gets created, but the Sink does nothing. Running:
pactl load-module module-ladspa-sink sink_name=Normalizer plugin=sc4_1882 label=sc4 control=1,1.5,401,-12,6,5,12
pactl load-module module-ladspa-sink sink_name=Normalized master=Normalizer plugin=fast_lookahead_limiter_1913 label=fastLookaheadLimiter control=5,-10,0.8
works as expected. PIPEWIRE_DEBUG=3 doesnt give me any errors. Am I missing something, or is this a bug?
How to Reproduce:
Put normalize.conf in pipewire.conf.d. normalize.conf:
context.modules = [
{ name = libpipewire-module-filter-chain
args = {
node.description = "Normalize Sink"
media.name = "Normalize Sink"
filter.graph = {
nodes = [
{
type = ladspa
name = sc4
plugin = sc4_1882
label = sc4
control = { "RMS/peak" = 1 "Attack time (ms)" = 1.5 "Release time (ms)" = 401 "Threshold level (dB)" = -12 "Ratio (1:n)" = 6 "Knee radius (dB)" = 5 "Makeup gain (dB)" = 12 }
}
{
type = ladspa
name = limiter
plugin = fast_lookahead_limiter_1913
label = fastLookaheadLimiter
control = { "Input gain (dB)" = 5 "Limit (dB)" = -10 "Release time (s)" = 0.8 }
}
]
links = [
{ output = "sc4:Left output" input = "limiter:Input 1" }
{ output = "sc4:Right output" input = "limiter:Input 2" }
]
inputs = [ "sc4:Left input" "sc4:Right input"]
outputs = [ "limiter:Output 1" "limiter:Output 2" ]
}
capture.props = {
node.name = "effect_input.normalize"
media.class = "Audio/Sink"
audio.channels = 2
audio.position = [ FL FR ]
}
playback.props = {
node.name = "effect_output.normalize"
node.passive = true
audio.channels = 2
audio.position = [ FL FR ]
}
}
}
]
Set audio output sink to the Normalize Sink and play sound to test output.
Actual Results:
Audio will play, but fails to normalize/process the audio and simply works exactly like setting the normal output sink with no change.
Expected Results:
Audio gets normalized.