mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-06 13:45:43 +01:00
Fix add/remove ALSA-MIDI ports bug
This commit is contained in:
parent
5bde8f4456
commit
c5346f5c15
1 changed files with 4 additions and 2 deletions
|
|
@ -692,9 +692,10 @@ AlsaAudioBackend::set_midi_device_enabled (std::string const device, bool enable
|
|||
assert (_rmidi_out.size() > i);
|
||||
AlsaMidiOut *rm = _rmidi_out.at(i);
|
||||
if (rm->name () != device) { ++it; ++i; continue; }
|
||||
it = _system_midi_out.erase (it);
|
||||
unregister_port (*it);
|
||||
it = _system_midi_out.erase (it);
|
||||
rm->stop();
|
||||
assert (rm == *(_rmidi_out.begin() + i));
|
||||
_rmidi_out.erase (_rmidi_out.begin() + i);
|
||||
delete rm;
|
||||
}
|
||||
|
|
@ -704,9 +705,10 @@ AlsaAudioBackend::set_midi_device_enabled (std::string const device, bool enable
|
|||
assert (_rmidi_in.size() > i);
|
||||
AlsaMidiIn *rm = _rmidi_in.at(i);
|
||||
if (rm->name () != device) { ++it; ++i; continue; }
|
||||
it = _system_midi_in.erase (it);
|
||||
unregister_port (*it);
|
||||
it = _system_midi_in.erase (it);
|
||||
rm->stop();
|
||||
assert (rm == *(_rmidi_in.begin() + i));
|
||||
_rmidi_in.erase (_rmidi_in.begin() + i);
|
||||
delete rm;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue