From 13c22b11e4a39fce7a7a32284a32dfee1bcbc957 Mon Sep 17 00:00:00 2001 From: falkTX Date: Wed, 31 Oct 2012 22:21:21 +0000 Subject: [PATCH] Carla: dispatch VST effBegin/EndSetProgram between effSetProgram calls --- c++/carla-backend/vst.cpp | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/c++/carla-backend/vst.cpp b/c++/carla-backend/vst.cpp index fe04a6f..828208f 100644 --- a/c++/carla-backend/vst.cpp +++ b/c++/carla-backend/vst.cpp @@ -316,12 +316,16 @@ public: if (x_engine->isOffline()) { const CarlaEngine::ScopedLocker m(x_engine, block); + effect->dispatcher(effect, effBeginSetProgram, 0, 0, nullptr, 0.0f); effect->dispatcher(effect, effSetProgram, 0, index, nullptr, 0.0f); + effect->dispatcher(effect, effEndSetProgram, 0, 0, nullptr, 0.0f); } else { const ScopedDisabler m(this, block); + effect->dispatcher(effect, effBeginSetProgram, 0, 0, nullptr, 0.0f); effect->dispatcher(effect, effSetProgram, 0, index, nullptr, 0.0f); + effect->dispatcher(effect, effEndSetProgram, 0, 0, nullptr, 0.0f); } } @@ -744,6 +748,21 @@ public: recreateLatencyBuffers(); } + // special plugin fixes +#ifdef __WINE__ + // 1. IL Harmless - disable threaded processing + if (effect->uniqueID == 1229484653) + { + char strBuf[255] = { 0 }; + getLabel(strBuf); + + if (strcmp(strBuf, "IL Harmless") == 0) + { + // TODO - disable threaded processing + } + } +#endif + reloadPrograms(true); x_client->activate();