Add a function for temporarily blocking event loop

This can be used to prevent the Win32 message loop from running while
there are plugins in some partially initialized state.
This commit is contained in:
Robbert van der Helm
2021-01-27 18:46:36 +01:00
parent 04d0ff0949
commit 72e29d044a
5 changed files with 89 additions and 9 deletions
+8
View File
@@ -59,6 +59,8 @@ class Vst2Bridge : public HostBridge {
std::string plugin_dll_path,
std::string endpoint_base_dir);
bool inhibits_event_loop() override;
/**
* Here we'll handle incoming `dispatch()` messages until the sockets get
* closed during `effClose()`.
@@ -127,6 +129,12 @@ class Vst2Bridge : public HostBridge {
*/
AEffect* plugin;
/**
* Whether `effOpen()` has already been called. Used in
* `HostBridge::inhibits_event_loop` to work around a bug in T-RackS 5.
*/
bool is_initialized = false;
/**
* The thread that responds to `getParameter` and `setParameter` requests.
*/