mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-03 09:01:54 -05:00
jack: use PIPEWIRE_LINK_PASSIVE environment var
Let the jack client make passive links when the PIPEWIRE_LINK_PASSIVE variable is set. Makes it possible to start qsynth with passive links so that it suspends when not in use.
This commit is contained in:
parent
16d61e98e8
commit
0441653ce4
1 changed files with 5 additions and 1 deletions
|
|
@ -3672,9 +3672,10 @@ int jack_connect (jack_client_t *client,
|
|||
struct client *c = (struct client *) client;
|
||||
struct object *src, *dst;
|
||||
struct spa_dict props;
|
||||
struct spa_dict_item items[5];
|
||||
struct spa_dict_item items[6];
|
||||
struct pw_proxy *proxy;
|
||||
char val[4][16];
|
||||
const char *str;
|
||||
int res;
|
||||
|
||||
spa_return_val_if_fail(c != NULL, -EINVAL);
|
||||
|
|
@ -3707,6 +3708,9 @@ int jack_connect (jack_client_t *client,
|
|||
items[props.n_items++] = SPA_DICT_ITEM_INIT(PW_KEY_LINK_INPUT_NODE, val[2]);
|
||||
items[props.n_items++] = SPA_DICT_ITEM_INIT(PW_KEY_LINK_INPUT_PORT, val[3]);
|
||||
items[props.n_items++] = SPA_DICT_ITEM_INIT(PW_KEY_OBJECT_LINGER, "true");
|
||||
if ((str = getenv("PIPEWIRE_LINK_PASSIVE")) != NULL &&
|
||||
pw_properties_parse_bool(str))
|
||||
items[props.n_items++] = SPA_DICT_ITEM_INIT(PW_KEY_LINK_PASSIVE, "true");
|
||||
|
||||
proxy = pw_core_create_object(c->core,
|
||||
"link-factory",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue