Disable MIDI rescan after devicechange, to avoid deadlock

This commit is contained in:
Ken Cooke 2019-05-06 10:46:54 -07:00
parent 75b6705f19
commit ea9690d72b

View file

@ -557,7 +557,10 @@ public:
return true;
}
}
// Attempting to close MIDI interfaces of a hot-unplugged device can result in audio-driver deadlock.
// Detecting MIDI devices that have been added/removed after starting Inteface has been disabled.
// https://support.microsoft.com/en-us/help/4460006/midi-device-app-hangs-when-former-midi-api-is-used
#if 0
if (message->message == WM_DEVICECHANGE) {
const float MIN_DELTA_SECONDS = 2.0f; // de-bounce signal
static float lastTriggerTime = 0.0f;
@ -567,6 +570,7 @@ public:
Midi::USBchanged(); // re-scan the MIDI bus
}
}
#endif
}
return false;
}