PIPEWIRE_LATENCY always overrides app settings

This commit is contained in:
Wim Taymans 2021-02-20 20:59:41 +01:00
parent a5dc2493df
commit 71e37f93f3
3 changed files with 5 additions and 10 deletions

View file

@ -2517,8 +2517,7 @@ jack_client_t * jack_client_open (const char *client_name,
pw_properties_set(client->props, PW_KEY_MEDIA_CATEGORY, "Duplex");
if (pw_properties_get(client->props, PW_KEY_MEDIA_ROLE) == NULL)
pw_properties_set(client->props, PW_KEY_MEDIA_ROLE, "DSP");
if (pw_properties_get(client->props, PW_KEY_NODE_LATENCY) == NULL &&
(str = getenv("PIPEWIRE_LATENCY")) != NULL)
if ((str = getenv("PIPEWIRE_LATENCY")) != NULL)
pw_properties_set(client->props, PW_KEY_NODE_LATENCY, str);
if (pw_properties_get(client->props, PW_KEY_NODE_ALWAYS_PROCESS) == NULL)
pw_properties_set(client->props, PW_KEY_NODE_ALWAYS_PROCESS, "true");

View file

@ -1003,10 +1003,8 @@ filter_new(struct pw_context *context, const char *name,
str = name;
pw_properties_set(props, PW_KEY_NODE_NAME, str);
}
if (pw_properties_get(props, PW_KEY_NODE_LATENCY) == NULL) {
if ((str = getenv("PIPEWIRE_LATENCY")) != NULL)
pw_properties_set(props, PW_KEY_NODE_LATENCY, str);
}
if ((str = getenv("PIPEWIRE_LATENCY")) != NULL)
pw_properties_set(props, PW_KEY_NODE_LATENCY, str);
spa_hook_list_init(&impl->hooks);
this->properties = props;

View file

@ -1188,10 +1188,8 @@ stream_new(struct pw_context *context, const char *name,
str = name;
pw_properties_set(props, PW_KEY_NODE_NAME, str);
}
if (pw_properties_get(props, PW_KEY_NODE_LATENCY) == NULL) {
if ((str = getenv("PIPEWIRE_LATENCY")) != NULL)
pw_properties_set(props, PW_KEY_NODE_LATENCY, str);
}
if ((str = getenv("PIPEWIRE_LATENCY")) != NULL)
pw_properties_set(props, PW_KEY_NODE_LATENCY, str);
spa_hook_list_init(&impl->hooks);
this->properties = props;