audioconvert: add monitor.passthrough option

Add a monitor.passthrough option. This will pass all latency information
directly between the port and its monitor ports.

This is interesting when the adapter (and audioconvert) is used with a
null-audio-sink that simply forwards the data to a real sink/souce. In
that case, we want the sink/source latency to be passed unmodified.

Set the monitor.passthrough on the pulseaudio null-sink because
a passthrough virtual sink is the most likely use case for this.

Add some monitor.passthrough default config where it makes sense.

Fixes #3888
This commit is contained in:
Wim Taymans 2024-03-11 16:16:51 +01:00
parent 10830ab9f8
commit ea524b158c
4 changed files with 46 additions and 26 deletions

View file

@ -389,6 +389,7 @@ context.objects = [
# node.description = "Microphone"
# media.class = "Audio/Source/Virtual"
# audio.position = "FL,FR"
# monitor.passthrough = true
# adapter.auto-port-config = {
# mode = dsp
# monitor = true

View file

@ -259,6 +259,7 @@ context.objects = [
# node.description = "Microphone"
# media.class = "Audio/Source/Virtual"
# audio.position = "FL,FR"
# monitor.passthrough = true
# }
#}

View file

@ -196,6 +196,8 @@ static int module_null_sink_prepare(struct module * const module)
if (pw_properties_get(props, "monitor.channel-volumes") == NULL)
pw_properties_set(props, "monitor.channel-volumes", "true");
if (pw_properties_get(props, "monitor.passthrough") == NULL)
pw_properties_set(props, "monitor.passthrough", "true");
return 0;
}