Browse Source

Tweak previous commit to work under plugin bridges too

Signed-off-by: falkTX <falktx@falktx.com>
tags/v2.2.0-RC1
falkTX 4 years ago
parent
commit
ac3c8aacb4
Signed by: falkTX <falktx@falktx.com> GPG Key ID: CDBAA37ABC74FBA0
1 changed files with 6 additions and 4 deletions
  1. +6
    -4
      source/backend/plugin/CarlaPluginVST2.cpp

+ 6
- 4
source/backend/plugin/CarlaPluginVST2.cpp View File

@@ -2419,25 +2419,27 @@ public:
sCurrentUniqueId = static_cast<intptr_t>(uniqueId);
sLastCarlaPluginVST2 = this;

bool wasTriggered;
bool wasTriggered, wasThrown = false;
{
const ScopedAbortCatcher sac;

try {
fEffect = vstFn(carla_vst_audioMasterCallback);
} CARLA_SAFE_EXCEPTION_RETURN("Vst init", false);
} CARLA_CATCH_UNWIND catch(...) {
wasThrown = true;
}

wasTriggered = sac.wasTriggered();
}

// try again if plugin blows
if (wasTriggered)
if (wasTriggered || wasThrown)
{
const ScopedAbortCatcher sac;

try {
fEffect = vstFn(carla_vst_audioMasterCallback);
} CARLA_SAFE_EXCEPTION_RETURN("Vst init", false);
} CARLA_SAFE_EXCEPTION_RETURN("VST init 2nd attempt", false);
}

sLastCarlaPluginVST2 = nullptr;


Loading…
Cancel
Save