From 764f5978b2b46a85ffafd56beb0fc5c00d4f82e8 Mon Sep 17 00:00:00 2001 From: falkTX Date: Sun, 21 Apr 2013 04:22:59 +0100 Subject: [PATCH] Try to prevent host<->UIs parameter changes feedback-loop --- source/backend/plugin/CarlaPlugin.cpp | 6 +++++- source/backend/plugin/Lv2Plugin.cpp | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/source/backend/plugin/CarlaPlugin.cpp b/source/backend/plugin/CarlaPlugin.cpp index a4b8fd542..d7e61bcea 100644 --- a/source/backend/plugin/CarlaPlugin.cpp +++ b/source/backend/plugin/CarlaPlugin.cpp @@ -1278,7 +1278,11 @@ void CarlaPlugin::setParameterValueByRealIndex(const int32_t rindex, const float for (uint32_t i=0; i < kData->param.count; ++i) { 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; + } } } diff --git a/source/backend/plugin/Lv2Plugin.cpp b/source/backend/plugin/Lv2Plugin.cpp index 1699531d2..258c37dda 100644 --- a/source/backend/plugin/Lv2Plugin.cpp +++ b/source/backend/plugin/Lv2Plugin.cpp @@ -3411,7 +3411,11 @@ protected: for (uint32_t i=0; i < kData->param.count; ++i) { if (kData->param.data[i].rindex == static_cast(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)