mirror of
https://github.com/overte-org/overte.git
synced 2025-08-10 05:23:09 +02:00
Disable MIDI rescan after devicechange, to avoid deadlock
This commit is contained in:
parent
75b6705f19
commit
ea9690d72b
1 changed files with 5 additions and 1 deletions
|
@ -557,7 +557,10 @@ public:
|
||||||
return true;
|
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) {
|
if (message->message == WM_DEVICECHANGE) {
|
||||||
const float MIN_DELTA_SECONDS = 2.0f; // de-bounce signal
|
const float MIN_DELTA_SECONDS = 2.0f; // de-bounce signal
|
||||||
static float lastTriggerTime = 0.0f;
|
static float lastTriggerTime = 0.0f;
|
||||||
|
@ -567,6 +570,7 @@ public:
|
||||||
Midi::USBchanged(); // re-scan the MIDI bus
|
Midi::USBchanged(); // re-scan the MIDI bus
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue