From 5178faad31ec80d3af3d1b69a9257c6937e833f5 Mon Sep 17 00:00:00 2001 From: falkTX Date: Thu, 27 Jun 2013 18:58:51 +0100 Subject: [PATCH] DPT fixes --- .../native/nekobi/DistrhoPluginNekobi.cpp | 6 +++++- .../distrho/src/DistrhoPluginLADSPA+DSSI.cpp | 20 ++++++++++++------- 2 files changed, 18 insertions(+), 8 deletions(-) diff --git a/source/backend/native/nekobi/DistrhoPluginNekobi.cpp b/source/backend/native/nekobi/DistrhoPluginNekobi.cpp index 7e5437388..79434313f 100644 --- a/source/backend/native/nekobi/DistrhoPluginNekobi.cpp +++ b/source/backend/native/nekobi/DistrhoPluginNekobi.cpp @@ -18,7 +18,11 @@ #include "DistrhoPluginNekobi.hpp" -#include "CarlaUtils.hpp" +#ifdef CARLA_EXPORT +# include "CarlaUtils.hpp" +#else +# define CARLA_SAFE_ASSERT_INT2(...) +#endif extern "C" { #include "nekobee-src/nekobee_synth.c" diff --git a/source/libs/distrho/src/DistrhoPluginLADSPA+DSSI.cpp b/source/libs/distrho/src/DistrhoPluginLADSPA+DSSI.cpp index 258ce63ef..efc858065 100644 --- a/source/libs/distrho/src/DistrhoPluginLADSPA+DSSI.cpp +++ b/source/libs/distrho/src/DistrhoPluginLADSPA+DSSI.cpp @@ -42,16 +42,22 @@ class PluginLadspaDssi { public: PluginLadspaDssi() - : fPortAudioIns{nullptr}, - fPortAudioOuts{nullptr} { - const uint32_t count(fPlugin.parameterCount()); + for (uint32_t i=0; i < DISTRHO_PLUGIN_NUM_INPUTS; ++i) + fPortAudioIns[i] = nullptr; - fPortControls.resize(count, nullptr); - fLastControlValues.resize(count, 0.0f); + for (uint32_t i=0; i < DISTRHO_PLUGIN_NUM_OUTPUTS; ++i) + fPortAudioOuts[i] = nullptr; - for (uint32_t i=0; i < count; ++i) - fLastControlValues[i] = fPlugin.parameterValue(i); + { + const uint32_t count(fPlugin.parameterCount()); + + fPortControls.resize(count, nullptr); + fLastControlValues.resize(count, 0.0f); + + for (uint32_t i=0; i < count; ++i) + fLastControlValues[i] = fPlugin.parameterValue(i); + } #if DISTRHO_PLUGIN_WANT_LATENCY fPortLatency = nullptr;