diff --git a/source/backend/plugin/CarlaPluginVST2.cpp b/source/backend/plugin/CarlaPluginVST2.cpp index 9b05aa006..5def181a0 100644 --- a/source/backend/plugin/CarlaPluginVST2.cpp +++ b/source/backend/plugin/CarlaPluginVST2.cpp @@ -1571,6 +1571,8 @@ public: // -------------------------------------------------------------------------------------------------------- // Set MIDI events + fIsProcessing = true; + if (fMidiEventCount > 0) { fEvents.numEvents = static_cast(fMidiEventCount); @@ -1581,8 +1583,6 @@ public: // -------------------------------------------------------------------------------------------------------- // Run plugin - fIsProcessing = true; - if (pData->hints & PLUGIN_CAN_PROCESS_REPLACING) { fEffect->processReplacing(fEffect, (pData->audioIn.count > 0) ? vstInBuffer : nullptr, (pData->audioOut.count > 0) ? vstOutBuffer : nullptr, static_cast(frames)); @@ -1598,7 +1598,6 @@ public: } fIsProcessing = false; - fTimeInfo.samplePos += frames; #ifndef BUILD_BRIDGE @@ -1776,11 +1775,10 @@ protected: const uint32_t uindex(static_cast(index)); const float fixedValue(pData->param.getFixedValue(uindex, opt)); - // Called from plugin process thread, nasty! + // Called from plugin process thread, nasty! (likely MIDI learn) if (pthread_equal(pthread_self(), fProcThread)) { CARLA_SAFE_ASSERT(fIsProcessing); - pData->postponeRtEvent(kPluginPostRtEventParameterChange, index, 0, fixedValue); } // Called from UI