mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
env vars should override everything
Always first use the env var and then check the properties. So that PIPEWIRE_CORE=pipewire-1 PIPEWIRE_REMOTE=pipewire-1 make run runs everything on pipewire-1 sockets regardless of the config files. Also PIPEWIRE_NODE always needs to be taken into account first.
This commit is contained in:
parent
782e0dfb1f
commit
c8850f8766
6 changed files with 13 additions and 24 deletions
|
|
@ -1418,10 +1418,6 @@ SND_CTL_PLUGIN_DEFINE_FUNC(pipewire)
|
|||
if (str != NULL)
|
||||
pw_properties_update_string(ctl->props, str, strlen(str));
|
||||
|
||||
str = getenv("PIPEWIRE_REMOTE");
|
||||
if (str != NULL && str[0] != '\0')
|
||||
pw_properties_set(ctl->props, PW_KEY_REMOTE_NAME, str);
|
||||
|
||||
if ((str = pw_properties_get(ctl->props, "alsa.volume-method")) == NULL)
|
||||
str = DEFAULT_VOLUME_METHOD;
|
||||
|
||||
|
|
|
|||
|
|
@ -1158,10 +1158,6 @@ static int snd_pcm_pipewire_open(snd_pcm_t **pcmp,
|
|||
if (str != NULL && str[0])
|
||||
pw_properties_set(pw->props, PW_KEY_TARGET_OBJECT, str);
|
||||
|
||||
str = getenv("PIPEWIRE_REMOTE");
|
||||
if (str != NULL && str[0])
|
||||
pw_properties_set(pw->props, PW_KEY_REMOTE_NAME, str);
|
||||
|
||||
node_name = pw_properties_get(pw->props, PW_KEY_NODE_NAME);
|
||||
if (pw_properties_get(pw->props, PW_KEY_MEDIA_NAME) == NULL)
|
||||
pw_properties_set(pw->props, PW_KEY_MEDIA_NAME, node_name);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue