Commit e89e87ba authored by Wim Taymans's avatar Wim Taymans
Browse files

alsa-seq: generate the same name as a2jmidid

It is more descriptive and more compatible.
If we change Midi-Bridge to a2j, some apps will parse our port names
in a special way, even (catia).
parent 3c01cfe8
Pipeline #279550 passed with stages
in 1 minute and 2 seconds
......@@ -226,7 +226,7 @@ static inline void clean_name(char *name)
{
char *c;
for (c = name; *c; ++c) {
if (!isalnum(*c) && strchr(" /_:()", *c) == NULL)
if (!isalnum(*c) && strchr(" /_:()[]", *c) == NULL)
*c = '-';
}
}
......@@ -254,10 +254,12 @@ static void emit_port_info(struct seq_state *this, struct seq_port *port, bool f
snd_seq_get_any_client_info(this->sys.hndl,
port->addr.client, client_info);
snprintf(name, sizeof(name), "%s:%s_%d",
snprintf(name, sizeof(name), "%s [%d] (%s): [%d] %s",
snd_seq_client_info_get_name(client_info),
port->addr.client,
port->direction == SPA_DIRECTION_OUTPUT ? "capture" : "playback",
port->addr.port);
port->addr.port,
snd_seq_port_info_get_name(info));
clean_name(name);
snprintf(path, sizeof(path), "alsa:seq:%s:client_%d:%s_%d",
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment