Browse Source

Import distrho toolkit fix

tags/1.9.4
falkTX 11 years ago
parent
commit
a1e94b546e
3 changed files with 13 additions and 6 deletions
  1. +1
    -1
      source/modules/distrho/src/DistrhoPluginLADSPA+DSSI.cpp
  2. +10
    -0
      source/modules/distrho/src/DistrhoPluginVST.cpp
  3. +2
    -5
      source/modules/distrho/src/DistrhoUILV2.cpp

+ 1
- 1
source/modules/distrho/src/DistrhoPluginLADSPA+DSSI.cpp View File

@@ -262,7 +262,7 @@ public:

updateParameterOutputs();

#if ! DISTRHO_PLUGIN_IS_SYNTH
#if defined(DISTRHO_PLUGIN_TARGET_DSSI) && ! DISTRHO_PLUGIN_IS_SYNTH
return; // unused
(void)events;
(void)eventCount;


+ 10
- 0
source/modules/distrho/src/DistrhoPluginVST.cpp View File

@@ -68,12 +68,18 @@ void strncpy(char* const dst, const char* const src, const size_t size)

// -----------------------------------------------------------------------

#if DISTRHO_PLUGIN_WANT_STATE
class StateHelper
{
public:
virtual ~StateHelper() {}
virtual void setSharedState(const char* const newKey, const char* const newValue) = 0;
};
#else
typedef void StateHelper;
#endif

// -----------------------------------------------------------------------

#if DISTRHO_PLUGIN_HAS_UI
class UIVst
@@ -293,7 +299,11 @@ private:

// -----------------------------------------------------------------------

#if DISTRHO_PLUGIN_WANT_STATE
class PluginVst : public StateHelper
#else
class PluginVst
#endif
{
public:
PluginVst(const audioMasterCallback audioMaster, AEffect* const effect) noexcept


+ 2
- 5
source/modules/distrho/src/DistrhoUILV2.cpp View File

@@ -23,6 +23,8 @@
#include "lv2/urid.h"
#include "lv2/lv2_programs.h"

#include <string>

START_NAMESPACE_DISTRHO

// -----------------------------------------------------------------------
@@ -39,9 +41,6 @@ public:
fWriteFunction(writeFunc)
{
fUiResize->ui_resize(fUiResize->handle, fUI.getWidth(), fUI.getHeight());

setState("MyKey1", "MyValue1");
setState("My Key 2", "My Value 2");
}

// -------------------------------------------------------------------
@@ -59,8 +58,6 @@ public:

const float value(*(const float*)buffer);
fUI.parameterChanged(rindex-parameterOffset, value);

d_stderr("port changed %i, %i, %f", rindex, parameterOffset, value);
}
else
{


Loading…
Cancel
Save