diff --git a/CHANGELOG.md b/CHANGELOG.md index a61269e6..75d7b23d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -29,6 +29,11 @@ Versioning](https://semver.org/spec/v2.0.0.html). ### Fixed +- Fixed _New Sonic Arts' Vice_ plugin freezing when loading the plugin. This + happened because the plugin tried to spawn new threads and perform drawing + calls when changing the sample rate or block size from the audio thread. We're + now doing these things from the main GUI thread, so please let me know if this + results in loading issues with any other VST2 plugins. - Fixed the drag-and-drop implementation not sending an `XdndStatus` message on the very first tick. This fixes drag-and-drop from _Samplab_ which has a broken drag-and-drop implementation and only starts the operation after the diff --git a/src/wine-host/bridges/vst2.cpp b/src/wine-host/bridges/vst2.cpp index b4fdf23f..b07b554c 100644 --- a/src/wine-host/bridges/vst2.cpp +++ b/src/wine-host/bridges/vst2.cpp @@ -94,10 +94,15 @@ static const std::unordered_set safe_mutually_recursive_requests{ * 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 + * NOTE: `effSetSampleRate` and `effSetBlockSize` really shouldn't be here, but + * New Sonic Arts' Vice plugin spawns a new thread and calls drawing code + * while changing sample rate and block size. We'll need to see if doing + * this on the main thread introduces any regressions. */ static const std::unordered_set unsafe_requests{ - effOpen, effClose, effEditGetRect, effEditOpen, effEditClose, - effEditIdle, effEditTop, effMainsChanged, effGetChunk, effSetChunk}; + effOpen, effClose, effEditGetRect, effEditOpen, + effEditClose, effEditIdle, effEditTop, effMainsChanged, + effGetChunk, effSetChunk, effSetSampleRate, effSetBlockSize}; /** * These opcodes from `unsafe_requests` should be run under realtime scheduling