Handle dispatch() directly during event handling

When the message loop is active and we get an incoming dispatch() event,
we'll just handle it directly. In practice this would only be needed
when the event is a response to an `audioMaster()` call made during the
event loop, but we can't know that. This allows the `getProgram()`
during `audioMasterUpdateDisplay()` in REAPER and Renoise to work
correctly. Hopefully this doesn't cause random rare breakage.
This commit is contained in:
Robbert van der Helm
2020-10-26 20:00:26 +01:00
parent c95e8aa63c
commit ca2b95e7aa
8 changed files with 122 additions and 78 deletions
+1 -9
View File
@@ -217,7 +217,7 @@ class GroupBridge {
* operations that may involve the Win32 mesasge loop (e.g. initialization
* and most `AEffect::dispatcher()` calls) should be run on.
*/
boost::asio::io_context plugin_context;
PluginContext plugin_context;
/**
* A seperate IO context that handles the STDIO redirect through
* `StdIoCapture`. This is seperated the `plugin_context` above so that
@@ -279,14 +279,6 @@ class GroupBridge {
*/
std::mutex active_plugins_mutex;
/**
* A timer used to repeatedly handle the Win32 message loop and the X11
* events.
*
8 @see async_handle_events
*/
boost::asio::steady_timer events_timer;
/**
* A timer to defer shutting down the process, allowing for fast plugin
* scanning without having to start a new group host process for each