diff --git a/CHANGELOG.md b/CHANGELOG.md index 165bbf6d..102fed67 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -52,6 +52,13 @@ TODO: Add an updated screenshot with some fancy VST3-only plugins to the readme with, and it then applies the change conditionally to be able to support building with both older and newer versions of Wine. +### Fixed + +- The function for suspending and resuming audio, `effMainsChanged()`, is now + always executed from the GUI thread. This fixes **EZdrummer** not producing + any sound as it makes the incorrect assumption that `effMainsChanged()` is + always called from the GUI thread. + ### yabridgectl - Updated for the changes in yabridge 3.0. Yabridgectl now allows you to set up diff --git a/src/wine-host/bridges/vst2.cpp b/src/wine-host/bridges/vst2.cpp index 7d404b76..410b6ba3 100644 --- a/src/wine-host/bridges/vst2.cpp +++ b/src/wine-host/bridges/vst2.cpp @@ -40,10 +40,14 @@ std::mutex current_bridge_instance_mutex; /** * Opcodes that should always be handled on the main thread because they may * involve GUI operations. + * + * 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. */ -const std::set unsafe_opcodes{effOpen, effClose, effEditGetRect, - effEditOpen, effEditClose, effEditIdle, - effEditTop}; +const std::set unsafe_opcodes{effOpen, effClose, effEditGetRect, + effEditOpen, effEditClose, effEditIdle, + effEditTop, effMainsChanged}; intptr_t VST_CALL_CONV host_callback_proxy(AEffect*, int, int, intptr_t, void*, float);