Browse Source

Allow loading of vst2 plugins without an uniqueID at the start

Signed-off-by: falkTX <falktx@falktx.com>
tags/v2.1-rc1
falkTX 6 years ago
parent
commit
32bb7a5e62
Signed by: falkTX <falktx@falktx.com> GPG Key ID: CDBAA37ABC74FBA0
1 changed files with 9 additions and 3 deletions
  1. +9
    -3
      source/discovery/carla-discovery.cpp

+ 9
- 3
source/discovery/carla-discovery.cpp View File

@@ -1023,9 +1023,7 @@ static void do_vst_check(lib_t& libHandle, const char* const filename, const boo


if (effect->uniqueID == 0) if (effect->uniqueID == 0)
{ {
DISCOVERY_OUT("error", "Plugin doesn't have an Unique ID");
effect->dispatcher(effect, effClose, 0, 0, nullptr, 0.0f);
return;
DISCOVERY_OUT("warning", "Plugin doesn't have an Unique ID when first loaded");
} }


effect->dispatcher(effect, DECLARE_VST_DEPRECATED(effIdentify), 0, 0, nullptr, 0.0f); effect->dispatcher(effect, DECLARE_VST_DEPRECATED(effIdentify), 0, 0, nullptr, 0.0f);
@@ -1040,6 +1038,14 @@ static void do_vst_check(lib_t& libHandle, const char* const filename, const boo
effect->dispatcher(effect, effSetProgram, 0, 0, nullptr, 0.0f); effect->dispatcher(effect, effSetProgram, 0, 0, nullptr, 0.0f);


const bool isShell = (effect->dispatcher(effect, effGetPlugCategory, 0, 0, nullptr, 0.0f) == kPlugCategShell); const bool isShell = (effect->dispatcher(effect, effGetPlugCategory, 0, 0, nullptr, 0.0f) == kPlugCategShell);

if (effect->uniqueID == 0 && !isShell)
{
DISCOVERY_OUT("error", "Plugin doesn't have an Unique ID after being open");
effect->dispatcher(effect, effClose, 0, 0, nullptr, 0.0f);
return;
}

gVstCurrentUniqueId = effect->uniqueID; gVstCurrentUniqueId = effect->uniqueID;


char strBuf[STR_MAX+1]; char strBuf[STR_MAX+1];


Loading…
Cancel
Save