Skip to content

Commit

Permalink
[Fix] Avoid crash in plugin bridge if plugin changes channel configur…
Browse files Browse the repository at this point in the history
…ation without telling us (observed with Surge XT via vst3ishell, https://bugs.openmpt.org/view.php?id=1807).

git-svn-id: https://source.openmpt.org/svn/openmpt/trunk/OpenMPT@21556 56274372-70c3-4bfc-bfc3-4c3a0b034d27
  • Loading branch information
sagamusix committed Aug 31, 2024
1 parent c142601 commit f9bc67e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pluginBridge/Bridge.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -476,6 +476,9 @@ void PluginBridge::DispatchToPlugin(DispatchMsg &msg)
// [value]: 0 means "turn off", 1 means "turn on"
::SetThreadPriority(m_audioThread, msg.value ? THREAD_PRIORITY_ABOVE_NORMAL : THREAD_PRIORITY_NORMAL);
m_sharedMem->tailSize = static_cast<int32>(Dispatch(effGetTailSize, 0, 0, nullptr, 0.0f));
// Plugin should tell us if number of channels changes through audioMasterIOChanged, but Surge XT via vst3ishell has been observed not to do that.
if(msg.value)
DispatchToHost(audioMasterVendorSpecific, kVendorOpenMPT, kUpdateProcessingBuffer, nullptr, 0.0f);
break;

case effEditGetRect:
Expand Down

0 comments on commit f9bc67e

Please sign in to comment.