13
0

Fix incorrect port lists due to custom sort

Previously the following were treated as equal
 "MIDI_foo" == "MIDI bar"
So std::map<> PortManager::_ports and PortEngineSharedImpl:_ports
could only have either. This resulted in missing ports
and missing calls to existing ports in cycle_start().

This mainly affected MIDI tracks with imported files, since there
is "MIDI Clock in", and imported files result in tracks
"MIDI_file-name".

This issue was introduced in 6.6-200-g60ff3ef764
This commit is contained in:
Robin Gareus 2021-05-07 04:16:05 +02:00
parent bfd52fd94d
commit 98f5224d4c
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04

View File

@ -139,6 +139,12 @@ naturally_less (const char* a, const char* b)
#if 1
/* treat underscore as space, this works around idiosyncratic
* ffado port-names: "foo_in", "foo0_in", "foo2_in", etc */
if (*a == '_' && *b == ' ') {
continue;
}
if (*b == '_' && *a == ' ') {
continue;
}
if (*a == '_') {
return ' ' < *b;
} else if (*b == '_') {