From: <sv...@op...> - 2024-08-31 13:55:12
|
Author: sagamusix Date: Sat Aug 31 15:55:00 2024 New Revision: 21557 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=21557 Log: Merged revision(s) 21556 from trunk/OpenMPT: [Fix] Avoid crash in plugin bridge if plugin changes channel configuration without telling us (observed with Surge XT via vst3ishell, https://bugs.openmpt.org/view.php?id=1807). ........ Modified: branches/OpenMPT-1.31/ (props changed) branches/OpenMPT-1.31/pluginBridge/Bridge.cpp Modified: branches/OpenMPT-1.31/pluginBridge/Bridge.cpp ============================================================================== --- branches/OpenMPT-1.31/pluginBridge/Bridge.cpp Sat Aug 31 15:53:58 2024 (r21556) +++ branches/OpenMPT-1.31/pluginBridge/Bridge.cpp Sat Aug 31 15:55:00 2024 (r21557) @@ -478,6 +478,9 @@ // [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: |