Browse Source

Gracefully handle when a plugin refuses to init 2nd instance

tags/1.9.4
falkTX 11 years ago
parent
commit
9071dfbb8f
4 changed files with 44 additions and 32 deletions
  1. +11
    -8
      source/backend/plugin/DssiPlugin.cpp
  2. +11
    -8
      source/backend/plugin/LadspaPlugin.cpp
  3. +11
    -8
      source/backend/plugin/Lv2Plugin.cpp
  4. +11
    -8
      source/backend/plugin/NativePlugin.cpp

+ 11
- 8
source/backend/plugin/DssiPlugin.cpp View File

@@ -461,16 +461,19 @@ public:
if (fHandle2 == nullptr)
fHandle2 = fDescriptor->instantiate(fDescriptor, (unsigned long)sampleRate);

if (aIns == 1)
if (fHandle2 != nullptr)
{
aIns = 2;
forcedStereoIn = true;
}
if (aIns == 1)
{
aIns = 2;
forcedStereoIn = true;
}

if (aOuts == 1)
{
aOuts = 2;
forcedStereoOut = true;
if (aOuts == 1)
{
aOuts = 2;
forcedStereoOut = true;
}
}
}



+ 11
- 8
source/backend/plugin/LadspaPlugin.cpp View File

@@ -453,16 +453,19 @@ public:
if (fHandle2 == nullptr)
fHandle2 = fDescriptor->instantiate(fDescriptor, (unsigned long)sampleRate);

if (aIns == 1)
if (fHandle2 != nullptr)
{
aIns = 2;
forcedStereoIn = true;
}
if (aIns == 1)
{
aIns = 2;
forcedStereoIn = true;
}

if (aOuts == 1)
{
aOuts = 2;
forcedStereoOut = true;
if (aOuts == 1)
{
aOuts = 2;
forcedStereoOut = true;
}
}
}



+ 11
- 8
source/backend/plugin/Lv2Plugin.cpp View File

@@ -1400,16 +1400,19 @@ public:
if (fHandle2 == nullptr)
fHandle2 = fDescriptor->instantiate(fDescriptor, sampleRate, fRdfDescriptor->Bundle, fFeatures);

if (aIns == 1)
if (fHandle2 != nullptr)
{
aIns = 2;
forcedStereoIn = true;
}
if (aIns == 1)
{
aIns = 2;
forcedStereoIn = true;
}

if (aOuts == 1)
{
aOuts = 2;
forcedStereoOut = true;
if (aOuts == 1)
{
aOuts = 2;
forcedStereoOut = true;
}
}
}



+ 11
- 8
source/backend/plugin/NativePlugin.cpp View File

@@ -788,16 +788,19 @@ public:
if (fHandle2 == nullptr)
fHandle2 = fDescriptor->instantiate(fDescriptor, &fHost);

if (aIns == 1)
if (fHandle2 != nullptr)
{
aIns = 2;
forcedStereoIn = true;
}
if (aIns == 1)
{
aIns = 2;
forcedStereoIn = true;
}

if (aOuts == 1)
{
aOuts = 2;
forcedStereoOut = true;
if (aOuts == 1)
{
aOuts = 2;
forcedStereoOut = true;
}
}
}



Loading…
Cancel
Save