jack: apply PIPEWIRE_PROPS after reading config

First apply config properties, then PIPEWIRE_PROPS.
We can set the node.latency in jack.conf
This commit is contained in:
Wim Taymans 2021-02-20 21:02:05 +01:00
parent 71e37f93f3
commit 149319819a
2 changed files with 11 additions and 10 deletions

View file

@ -2421,19 +2421,16 @@ jack_client_t * jack_client_open (const char *client_name,
varargs_parse(client, options, ap);
va_end(ap);
if ((str = getenv("PIPEWIRE_PROPS")) != NULL)
client->props = pw_properties_new_string(str);
if (client->props == NULL)
client->props = pw_properties_new(NULL, NULL);
client->props = pw_properties_new(
"loop.cancel", "true",
PW_KEY_REMOTE_NAME, client->server_name,
PW_KEY_CLIENT_NAME, client_name,
PW_KEY_CLIENT_API, "jack",
PW_KEY_CONFIG_NAME, "jack.conf",
NULL);
if (client->props == NULL)
goto no_props;
pw_properties_set(client->props, "loop.cancel", "true");
pw_properties_set(client->props, PW_KEY_REMOTE_NAME, client->server_name);
pw_properties_set(client->props, PW_KEY_CLIENT_NAME, client_name);
pw_properties_set(client->props, PW_KEY_CLIENT_API, "jack");
pw_properties_set(client->props, PW_KEY_CONFIG_NAME, "jack.conf");
client->node_id = SPA_ID_INVALID;
strncpy(client->name, client_name, JACK_CLIENT_NAME_SIZE);
client->context.loop = pw_thread_loop_new(client_name, NULL);
@ -2452,6 +2449,9 @@ jack_client_t * jack_client_open (const char *client_name,
"jack.properties")) != NULL)
pw_properties_update_string(client->props, str, strlen(str));
if ((str = getenv("PIPEWIRE_PROPS")) != NULL)
pw_properties_update_string(client->props, str, strlen(str));
if ((str = pw_properties_get(client->props, "jack.merge-monitor")) != NULL)
client->merge_monitor = pw_properties_parse_bool(str);

View file

@ -54,5 +54,6 @@ context.modules = {
}
jack.properties = {
#node.latency = 1024/48000
#jack.merge-monitor = false
}