Run effSetChunk and effGetChunk from main thread

This commit is contained in:
Robbert van der Helm
2021-04-14 19:47:14 +02:00
parent 6ba2fbe98d
commit d97e699db1
2 changed files with 8 additions and 3 deletions
+2
View File
@@ -21,6 +21,8 @@ Versioning](https://semver.org/spec/v2.0.0.html).
### Fixed
- Fixed preset/state loading in both the VST2 and VST3 versions of _Algonaut
Atlas_ by loading and saving plugin state from the main GUI thread.
- Added a workaround for a bug present in every _Bluecat Audio_ VST3 plugin
where those plugins don't expose the `IPluginBase` interface through their
query interface.
+6 -3
View File
@@ -39,10 +39,13 @@ Vst2Bridge* current_bridge_instance = nullptr;
* NOTE: `effMainsChanged` is the odd one here. EZdrummer interacts with the
* Win32 message loop while handling this function. If we don't execute
* this from the main GUI thread, then EZdrummer won't produce any sound.
* NOTE: `effSetChunk` and `effGetChunk` should be callable from any thread, but
* Algonaut Atlas doesn't restore chunk data unless `effSetChunk` is run
* from the GUI thread
*/
const std::set<int> unsafe_opcodes{effOpen, effClose, effEditGetRect,
effEditOpen, effEditClose, effEditIdle,
effEditTop, effMainsChanged};
const std::set<int> unsafe_opcodes{
effOpen, effClose, effEditGetRect, effEditOpen, effEditClose,
effEditIdle, effEditTop, effMainsChanged, effGetChunk, effSetChunk};
intptr_t VST_CALL_CONV
host_callback_proxy(AEffect*, int, int, intptr_t, void*, float);