mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
add node and server argument
This commit is contained in:
parent
d2261dc1d6
commit
407ba17927
2 changed files with 33 additions and 7 deletions
|
|
@ -936,6 +936,7 @@ SND_PCM_PLUGIN_DEFINE_FUNC(pipewire)
|
|||
{
|
||||
snd_config_iterator_t i, next;
|
||||
const char *node_name = NULL;
|
||||
const char *server_name = NULL;
|
||||
const char *playback_node = NULL;
|
||||
const char *capture_node = NULL;
|
||||
int err;
|
||||
|
|
@ -953,6 +954,10 @@ SND_PCM_PLUGIN_DEFINE_FUNC(pipewire)
|
|||
snd_config_get_string(n, &node_name);
|
||||
continue;
|
||||
}
|
||||
if (strcmp(id, "server") == 0) {
|
||||
snd_config_get_string(n, &server_name);
|
||||
continue;
|
||||
}
|
||||
if (strcmp(id, "playback_node") == 0) {
|
||||
snd_config_get_string(n, &playback_node);
|
||||
continue;
|
||||
|
|
|
|||
|
|
@ -1,11 +1,32 @@
|
|||
# Add a specific named PipeWire pcm
|
||||
|
||||
defaults.pipewire.server "pipewire-0"
|
||||
defaults.pipewire.node "13"
|
||||
|
||||
pcm.pipewire {
|
||||
type pipewire
|
||||
playback_node "5"
|
||||
capture_node "4"
|
||||
hint {
|
||||
show on
|
||||
description "PipeWire Sound Server"
|
||||
}
|
||||
@args [ SERVER NODE ]
|
||||
@args.SERVER {
|
||||
type string
|
||||
default {
|
||||
@func refer
|
||||
name defaults.pipewire.server
|
||||
}
|
||||
}
|
||||
@args.NODE {
|
||||
type string
|
||||
default {
|
||||
@func refer
|
||||
name defaults.pipewire.node
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
type pipewire
|
||||
server $SERVER
|
||||
playback_node $NODE
|
||||
capture_node "6"
|
||||
hint {
|
||||
show on
|
||||
description "PipeWire Sound Server"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue