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.
This commit is contained in:
Wim Taymans 2021-04-20 09:36:14 +02:00
parent 1201795c46
commit 648c9b432c

View file

@ -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,8 +187,13 @@ 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");
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) {
res = -errno;