Browse Source

Fix last commit

Signed-off-by: falkTX <falktx@falktx.com>
pull/1805/head
falkTX 1 year ago
parent
commit
adee4e119a
Signed by: falkTX <falktx@falktx.com> GPG Key ID: CDBAA37ABC74FBA0
1 changed files with 14 additions and 6 deletions
  1. +14
    -6
      source/backend/plugin/CarlaPluginLV2.cpp

+ 14
- 6
source/backend/plugin/CarlaPluginLV2.cpp View File

@@ -6154,16 +6154,24 @@ public:

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

LV2_ControlInputPort_Change_Status handleCtrlInPortChangeReq(const uint32_t index, const float value)
LV2_ControlInputPort_Change_Status handleCtrlInPortChangeReq(const uint32_t rindex, const float value)
{
CARLA_SAFE_ASSERT_RETURN(index < fRdfDescriptor->PortCount, LV2_CONTROL_INPUT_PORT_CHANGE_ERR_INVALID_INDEX);
CARLA_SAFE_ASSERT_RETURN(fParamBuffers != nullptr, LV2_CONTROL_INPUT_PORT_CHANGE_ERR_UNKNOWN);

const float fixedValue = pData->param.getFixedValue(index, value);
fParamBuffers[index] = fixedValue;
for (uint32_t i=0; i < pData->param.count; ++i)
{
if (pData->param.data[i].rindex != static_cast<int32_t>(rindex))
continue;

const uint32_t index = i;
const float fixedValue = pData->param.getFixedValue(index, value);
fParamBuffers[index] = fixedValue;

CarlaPlugin::setParameterValueRT(index, fixedValue, 0, true);
return LV2_CONTROL_INPUT_PORT_CHANGE_SUCCESS;
}

CarlaPlugin::setParameterValueRT(index, fixedValue, 0, true);
return LV2_CONTROL_INPUT_PORT_CHANGE_SUCCESS;
return LV2_CONTROL_INPUT_PORT_CHANGE_ERR_INVALID_INDEX;
}

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


Loading…
Cancel
Save