@@ -590,7 +590,8 @@ struct CarlaPluginProtectedData { | |||||
masterMutex.unlock(); | masterMutex.unlock(); | ||||
singleMutex.unlock(); | singleMutex.unlock(); | ||||
libClose(); | |||||
if (lib != nullptr) | |||||
libClose(); | |||||
} | } | ||||
// ------------------------------------------------------------------- | // ------------------------------------------------------------------- | ||||
@@ -1927,6 +1927,10 @@ public: | |||||
kData->idStr += "/"; | kData->idStr += "/"; | ||||
kData->idStr += label; | kData->idStr += label; | ||||
fOptions = kData->loadSettings(fOptions, availableOptions()); | fOptions = kData->loadSettings(fOptions, availableOptions()); | ||||
// ignore settings, we need this anyway | |||||
if (isDssiVst) | |||||
fOptions |= PLUGIN_OPTION_FIXED_BUFFER; | |||||
} | } | ||||
return true; | return true; | ||||
@@ -1443,9 +1443,18 @@ public: | |||||
// load plugin settings | // load plugin settings | ||||
{ | { | ||||
#ifdef __USE_GNU | |||||
const bool isDssiVst = fFilename.contains("dssi-vst", true); | |||||
#else | |||||
const bool isDssiVst = fFilename.contains("dssi-vst"); | |||||
#endif | |||||
// set default options | // set default options | ||||
fOptions = 0x0; | fOptions = 0x0; | ||||
if (isDssiVst) | |||||
fOptions |= PLUGIN_OPTION_FIXED_BUFFER; | |||||
if (kData->engine->getOptions().forceStereo) | if (kData->engine->getOptions().forceStereo) | ||||
fOptions |= PLUGIN_OPTION_FORCE_STEREO; | fOptions |= PLUGIN_OPTION_FORCE_STEREO; | ||||
@@ -1457,6 +1466,10 @@ public: | |||||
kData->idStr += "/"; | kData->idStr += "/"; | ||||
kData->idStr += label; | kData->idStr += label; | ||||
fOptions = kData->loadSettings(fOptions, availableOptions()); | fOptions = kData->loadSettings(fOptions, availableOptions()); | ||||
// ignore settings, we need this anyway | |||||
if (isDssiVst) | |||||
fOptions |= PLUGIN_OPTION_FIXED_BUFFER; | |||||
} | } | ||||
return true; | return true; | ||||
@@ -54,7 +54,7 @@ debug: | |||||
# -------------------------------------------------------------- | # -------------------------------------------------------------- | ||||
%.cpp.o: %.cpp moc_CarlaPlugin.cpp ../CarlaBackend.hpp ../CarlaEngine.hpp ../CarlaPlugin.hpp CarlaPluginGui.hpp CarlaPluginInternal.hpp CarlaPluginThread.hpp | |||||
%.cpp.o: %.cpp moc_CarlaPluginGui.cpp ../CarlaBackend.hpp ../CarlaEngine.hpp ../CarlaPlugin.hpp CarlaPluginGui.hpp CarlaPluginInternal.hpp CarlaPluginThread.hpp | |||||
$(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@ | $(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@ | ||||
moc_%.cpp: %.hpp | moc_%.cpp: %.hpp | ||||
@@ -359,7 +359,7 @@ static inline | |||||
void carla_zeroStruct(T* const structure, const size_t count) | void carla_zeroStruct(T* const structure, const size_t count) | ||||
{ | { | ||||
CARLA_ASSERT(structure != nullptr); | CARLA_ASSERT(structure != nullptr); | ||||
CARLA_ASSERT(count > 1); | |||||
CARLA_ASSERT(count >= 1); | |||||
std::memset(structure, 0, sizeof(T)*count); | std::memset(structure, 0, sizeof(T)*count); | ||||
} | } | ||||