mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-31 22:25:38 -04:00
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).
This commit is contained in:
parent
3c01cfe8f8
commit
e89e87ba94
1 changed files with 5 additions and 3 deletions
|
|
@ -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",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue