Browse Source

Make loading of vst chunk conflict less with non-juce plugins

Signed-off-by: falkTX <falktx@gmail.com>
tags/v2.1-rc1
falkTX 5 years ago
parent
commit
8e37bc8245
Signed by: falkTX <falktx@gmail.com> GPG Key ID: 2D3445A829213837
2 changed files with 5 additions and 3 deletions
  1. +3
    -1
      source/backend/plugin/CarlaPluginVST2.cpp
  2. +2
    -2
      source/modules/juce_audio_processors/format_types/juce_VSTPluginFormat.cpp

+ 3
- 1
source/backend/plugin/CarlaPluginVST2.cpp View File

@@ -2567,9 +2567,11 @@ private:

const int32_t* const set = (const int32_t*)data;

if (set[1] != 0)
return false;
if (! compareMagic(set[0], "CcnK"))
return false;
if (! compareMagic(set[2], "FBCh"))
if (! compareMagic(set[2], "FBCh") && ! compareMagic(set[2], "FJuc"))
return false;
if (fxbSwap(set[3]) > 1)
return false;


+ 2
- 2
source/modules/juce_audio_processors/format_types/juce_VSTPluginFormat.cpp View File

@@ -1220,7 +1220,7 @@ struct VSTPluginInstance : public AudioPluginInstance,
for (int i = 0; i < fxbSwap (prog->numParams); ++i)
setParameter (i, fxbSwapFloat (prog->params[i]));
}
else if (compareMagic (set->fxMagic, "FBCh"))
else if (compareMagic (set->fxMagic, "FBCh") || compareMagic (set->fxMagic, "FJuc"))
{
// non-preset chunk
auto cset = (const fxChunkSet*) data;
@@ -1268,7 +1268,7 @@ struct VSTPluginInstance : public AudioPluginInstance,
auto set = (fxChunkSet*) dest.getData();
set->chunkMagic = fxbName ("CcnK");
set->byteSize = 0;
set->fxMagic = fxbName ("FBCh");
set->fxMagic = fxbName ("FJuc");
set->version = fxbSwap (fxbVersionNum);
set->fxID = fxbSwap (getUID());
set->fxVersion = fxbSwap (getVersionNumber());


Loading…
Cancel
Save