FR: MIDI_GetRecentInputEvent() multithreading
I realize this might be a big ask, but would it be possible to improve the concurrency protection on MIDI_GetRecentInputEvent()? It looks like it's currently using a global critical region which can cause deadlocks.
My use case is this -- I am trying to develop a "smart thru" feature to prevent a MIDI hardware device from looping back to itself (I'm recording from the device and the track is also playing back to it). For whatever reason, the device freaks out when this happens. I am using the process()ing thread of a VST3 plugin to do this (since this is where I can compare incoming MIDI events to the recent input events to determine whether to block the output).
Anyway, it works great, except when it deadlocks. :-) Maybe you have a better suggestion, or maybe, just maybe, this isn't so hard to improve.
Thanks for considering it!
|