From 648c9b432c58cefc28018883a781400f796def6f Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Tue, 20 Apr 2021 09:36:14 +0200 Subject: [PATCH] pulse-server: set monitor.channel-volumes=true by default Make a null-sink with monitor.channel-volumes=true by default if not defined otherwise. This ensures the volume of the null-sink is always transfered to the monitor ports. Also only set the object.linger flag when undefined. --- .../module-protocol-pulse/modules/module-null-sink.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/modules/module-protocol-pulse/modules/module-null-sink.c b/src/modules/module-protocol-pulse/modules/module-null-sink.c index a4cfb685a..574314061 100644 --- a/src/modules/module-protocol-pulse/modules/module-null-sink.c +++ b/src/modules/module-protocol-pulse/modules/module-null-sink.c @@ -170,7 +170,7 @@ struct module *create_module_null_sink(struct impl *impl, const char *argument) pw_properties_set(props, SPA_KEY_AUDIO_POSITION, s); } - if ((str = pw_properties_get(props, PW_KEY_MEDIA_CLASS)) == NULL) + if (pw_properties_get(props, PW_KEY_MEDIA_CLASS) == NULL) pw_properties_set(props, PW_KEY_MEDIA_CLASS, "Audio/Sink"); if ((str = pw_properties_get(props, "device.description")) != NULL) { @@ -187,7 +187,12 @@ struct module *create_module_null_sink(struct impl *impl, const char *argument) class ? class : "", (class && class[0] != '\0') ? " " : ""); } pw_properties_set(props, PW_KEY_FACTORY_NAME, "support.null-audio-sink"); - pw_properties_set(props, PW_KEY_OBJECT_LINGER, "true"); + + if (pw_properties_get(props, PW_KEY_OBJECT_LINGER) == NULL) + pw_properties_set(props, PW_KEY_OBJECT_LINGER, "true"); + + if (pw_properties_get(props, "monitor.channel-volumes") == NULL) + pw_properties_set(props, "monitor.channel-volumes", "true"); module = module_new(impl, &module_null_sink_methods, sizeof(*d)); if (module == NULL) {