Browse Source

Try to prevent host<->UIs parameter changes feedback-loop

tags/1.9.4
falkTX 11 years ago
parent
commit
764f5978b2
2 changed files with 10 additions and 2 deletions
  1. +5
    -1
      source/backend/plugin/CarlaPlugin.cpp
  2. +5
    -1
      source/backend/plugin/Lv2Plugin.cpp

+ 5
- 1
source/backend/plugin/CarlaPlugin.cpp View File

@@ -1278,7 +1278,11 @@ void CarlaPlugin::setParameterValueByRealIndex(const int32_t rindex, const float
for (uint32_t i=0; i < kData->param.count; ++i) for (uint32_t i=0; i < kData->param.count; ++i)
{ {
if (kData->param.data[i].rindex == rindex) if (kData->param.data[i].rindex == rindex)
return setParameterValue(i, value, sendGui, sendOsc, sendCallback);
{
if (getParameterValue(i) != value)
setParameterValue(i, value, sendGui, sendOsc, sendCallback);
break;
}
} }
} }




+ 5
- 1
source/backend/plugin/Lv2Plugin.cpp View File

@@ -3411,7 +3411,11 @@ protected:
for (uint32_t i=0; i < kData->param.count; ++i) for (uint32_t i=0; i < kData->param.count; ++i)
{ {
if (kData->param.data[i].rindex == static_cast<int32_t>(rindex)) if (kData->param.data[i].rindex == static_cast<int32_t>(rindex))
return setParameterValue(i, value, false, true, true);
{
if (fParamBuffers[i] != value)
setParameterValue(i, value, false, true, true);
break;
}
} }
} }
else if (format == CARLA_URI_MAP_ID_ATOM_TRANSFER_ATOM) else if (format == CARLA_URI_MAP_ID_ATOM_TRANSFER_ATOM)


Loading…
Cancel
Save