Use same has for ALSA-seq and ALSA-raw devices
This commit is contained in:
parent
df90d4f636
commit
517b5f091f
@ -1636,7 +1636,7 @@ AlsaAudioBackend::register_system_midi_ports(const std::string device)
|
|||||||
delete mout;
|
delete mout;
|
||||||
} else {
|
} else {
|
||||||
char tmp[64];
|
char tmp[64];
|
||||||
snprintf(tmp, sizeof(tmp), "system:midi_playback_%u", elf_hash (i->first + i->second));
|
snprintf(tmp, sizeof(tmp), "system:midi_playback_%u", elf_hash (i->first));
|
||||||
PortHandle p = add_port(std::string(tmp), DataType::MIDI, static_cast<PortFlags>(IsInput | IsPhysical | IsTerminal));
|
PortHandle p = add_port(std::string(tmp), DataType::MIDI, static_cast<PortFlags>(IsInput | IsPhysical | IsTerminal));
|
||||||
if (!p) {
|
if (!p) {
|
||||||
mout->stop();
|
mout->stop();
|
||||||
@ -1675,7 +1675,7 @@ AlsaAudioBackend::register_system_midi_ports(const std::string device)
|
|||||||
delete midin;
|
delete midin;
|
||||||
} else {
|
} else {
|
||||||
char tmp[64];
|
char tmp[64];
|
||||||
snprintf(tmp, sizeof(tmp), "system:midi_capture_%u", elf_hash (i->first + i->second));
|
snprintf(tmp, sizeof(tmp), "system:midi_capture_%u", elf_hash (i->first));
|
||||||
PortHandle p = add_port(std::string(tmp), DataType::MIDI, static_cast<PortFlags>(IsOutput | IsPhysical | IsTerminal));
|
PortHandle p = add_port(std::string(tmp), DataType::MIDI, static_cast<PortFlags>(IsOutput | IsPhysical | IsTerminal));
|
||||||
if (!p) {
|
if (!p) {
|
||||||
midin->stop();
|
midin->stop();
|
||||||
|
Loading…
Reference in New Issue
Block a user