diff --git a/src/core/MidiIO.cpp b/src/core/MidiIO.cpp index 3d7eb727..346b93e0 100644 --- a/src/core/MidiIO.cpp +++ b/src/core/MidiIO.cpp @@ -63,12 +63,12 @@ std::vector MidiIO::getDevices() { void MidiIO::openDevice(std::string deviceName) { - MidiInWrapper *mw = midiInMap[deviceName]; - if (this->id > 0 || this->deviceName != "") { close(); } + MidiInWrapper *mw = midiInMap[deviceName]; + if (!mw) { try { mw = new MidiInWrapper();