jack: add option to disable monitor ports

Add a jack.show-monitor option (default true) that makes it possible
to hide the monitor ports.

Monitor ports are not enabled by default on JACK and maybe they also
should not for PipeWire. Or maybe we need some tweaks for some apps.

See #1760
This commit is contained in:
Wim Taymans 2021-10-29 09:27:46 +02:00
parent 0ace131d72
commit 9facfca45b
2 changed files with 5 additions and 0 deletions

View file

@ -386,6 +386,7 @@ struct client {
unsigned int allow_mlock:1;
unsigned int warn_mlock:1;
unsigned int timeowner_conditional:1;
unsigned int show_monitor:1;
unsigned int merge_monitor:1;
unsigned int short_name:1;
unsigned int filter_name:1;
@ -2684,6 +2685,8 @@ static void registry_event_global(void *data, uint32_t id,
is_monitor = pw_properties_parse_bool(item->value);
}
}
if (is_monitor && !c->show_monitor)
goto exit;
o = NULL;
if (node_id == c->node_id) {
@ -3044,6 +3047,7 @@ jack_client_t * jack_client_open (const char *client_name,
execute_match, client);
}
client->show_monitor = pw_properties_get_bool(client->props, "jack.show-monitor", true);
client->merge_monitor = pw_properties_get_bool(client->props, "jack.merge-monitor", false);
client->short_name = pw_properties_get_bool(client->props, "jack.short-name", false);
client->filter_name = pw_properties_get_bool(client->props, "jack.filter-name", false);

View file

@ -60,6 +60,7 @@ context.modules = [
jack.properties = {
#node.latency = 1024/48000
#node.lock-quantum = false
#jack.show-monitor = true
#jack.merge-monitor = false
#jack.short-name = false
#jack.filter-name = false