Browse Source

Fix carla-plugin never deleting plugins

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

+ 12
- 0
source/backend/engine/CarlaEngineNative.cpp View File

@@ -185,6 +185,7 @@ public:
fUiServer(this),
fLastScaleFactor(1.0f),
fLastProjectFolder(),
fPluginDeleterMutex(),
fOptionsForced(false)
{
carla_debug("CarlaEngineNative::CarlaEngineNative()");
@@ -1379,6 +1380,11 @@ protected:
static_cast<int>(kUiHeight * fLastScaleFactor + 0.5f),
nullptr, 0.0f);
}

{
const CarlaMutexLocker cml(fPluginDeleterMutex);
pData->deletePluginsAsNeeded();
}
}

void uiSetParameterValue(const uint32_t index, const float value)
@@ -1518,6 +1524,11 @@ protected:
removeAllPlugins();
fIsRunning = true;

{
const CarlaMutexLocker cml(fPluginDeleterMutex);
pData->deletePluginsAsNeeded();
}

// stopped during removeAllPlugins()
if (! pData->thread.isThreadRunning())
pData->thread.startThread();
@@ -1700,6 +1711,7 @@ private:
float fParameters[kNumInParams+kNumOutParams];
float fLastScaleFactor;
CarlaString fLastProjectFolder;
CarlaMutex fPluginDeleterMutex;

bool fOptionsForced;



Loading…
Cancel
Save