jack: keep midi ports on the midi-bridge client

Separating them causes problems because there is no actual
client for the resulting ports then.
This commit is contained in:
Wim Taymans 2021-03-04 18:06:07 +01:00
parent d98d947e54
commit 0ad603375f

View file

@ -112,7 +112,6 @@ struct object {
char name[JACK_CLIENT_NAME_SIZE+1];
int32_t priority;
uint32_t client_id;
bool is_bridge;
} node;
struct {
uint32_t src;
@ -2126,9 +2125,6 @@ static void registry_event_global(void *data, uint32_t id,
app = spa_dict_lookup(props, PW_KEY_APP_NAME);
if ((str = spa_dict_lookup(props, PW_KEY_MEDIA_CLASS)) != NULL)
o->node.is_bridge = strstr(str, "Bridge") != NULL;
if (c->short_name) {
str = spa_dict_lookup(props, PW_KEY_NODE_NICK);
if (str == NULL)
@ -2237,9 +2233,7 @@ static void registry_event_global(void *data, uint32_t id,
if (ot == NULL || ot->type != INTERFACE_Node)
goto exit_free;
if (ot->node.is_bridge && strchr(str, ':') != NULL)
snprintf(tmp, sizeof(tmp), "%s", str);
else if (is_monitor && !c->merge_monitor)
if (is_monitor && !c->merge_monitor)
snprintf(tmp, sizeof(tmp), "%.*s%s:%s",
(int)(JACK_CLIENT_NAME_SIZE-(sizeof(MONITOR_EXT)-1)),
ot->node.name, MONITOR_EXT, str);