Browse Source

Proper float comparison for param changes in lv2 and ladspa

pull/61/head
falkTX 6 years ago
parent
commit
4908bf4dc9
2 changed files with 3 additions and 3 deletions
  1. +2
    -2
      distrho/src/DistrhoPluginLADSPA+DSSI.cpp
  2. +1
    -1
      distrho/src/DistrhoPluginLV2.cpp

+ 2
- 2
distrho/src/DistrhoPluginLADSPA+DSSI.cpp View File

@@ -187,7 +187,7 @@ public:

curValue = *fPortControls[i];

if (fLastControlValues[i] != curValue && ! fPlugin.isParameterOutput(i))
if (d_isNotEqual(fLastControlValues[i], curValue) && ! fPlugin.isParameterOutput(i))
{
fLastControlValues[i] = curValue;
fPlugin.setParameterValue(i, curValue);
@@ -391,7 +391,7 @@ private:
else if ((fPlugin.getParameterHints(i) & kParameterIsTrigger) == kParameterIsTrigger)
{
// NOTE: no trigger support in LADSPA control ports, simulate it here
const float value = fPlugin.getParameterRanges(i).def;
value = fPlugin.getParameterRanges(i).def;

if (d_isEqual(value, fPlugin.getParameterValue(i)))
continue;


+ 1
- 1
distrho/src/DistrhoPluginLV2.cpp View File

@@ -519,7 +519,7 @@ public:

curValue = *fPortControls[i];

if (fLastControlValues[i] != curValue && ! fPlugin.isParameterOutput(i))
if (d_isNotEqual(fLastControlValues[i], curValue) && ! fPlugin.isParameterOutput(i))
{
fLastControlValues[i] = curValue;



Loading…
Cancel
Save