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
+2 -2
View File
@@ -74,7 +74,7 @@ class Vst2Bridge {
* @throw std::runtime_error Thrown when the VST plugin could not be loaded,
* or if communication could not be set up.
*/
Vst2Bridge(boost::asio::io_context& main_context,
Vst2Bridge(PluginContext& main_context,
std::string plugin_dll_path,
std::string endpoint_base_dir);
@@ -172,7 +172,7 @@ class Vst2Bridge {
* message handling can be performed from a single thread, even when hosting
* multiple plugins.
*/
boost::asio::io_context& io_context;
PluginContext& plugin_context;
/**
* The configuration for this instance of yabridge based on the `.so` file