Skip to content

Commit

Permalink
Run effVendorSpecific on the main thread
Browse files Browse the repository at this point in the history
This should fix a freeze in Renoise.
  • Loading branch information
robbert-vdh committed Nov 25, 2023
1 parent 2d40054 commit fa2b348
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/wine-host/bridges/vst2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -98,12 +98,16 @@ static const std::unordered_set<int> safe_mutually_recursive_requests{
* 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.
* NOTE: `effVendorSpecific` is used by Renoise to set the content scale, so it
* needs to run on the main thread:
*
* (<https://github.com/juce-framework/JUCE/blob/d054f0d14dcac387aebda44ce5d792b5e7a625b3/modules/juce_audio_plugin_client/juce_audio_plugin_client_VST2.cpp#L1812-L1814>)
*/
static const std::unordered_set<int> unsafe_requests{
effOpen, effClose, effEditGetRect, effEditOpen,
effEditClose, effEditIdle, effEditTop, effMainsChanged,
effGetChunk, effSetChunk, effBeginLoadBank, effBeginLoadProgram,
effSetSampleRate, effSetBlockSize};
effOpen, effClose, effEditGetRect, effEditOpen,
effEditClose, effEditIdle, effEditTop, effMainsChanged,
effGetChunk, effSetChunk, effBeginLoadBank, effBeginLoadProgram,
effSetSampleRate, effSetBlockSize, effVendorSpecific};

/**
* These opcodes from `unsafe_requests` should be run under realtime scheduling
Expand Down

0 comments on commit fa2b348

Please sign in to comment.