|
@@ -59,10 +59,8 @@ String AudioParameterFloat::getText (float v, int length) const |
|
|
|
|
|
|
|
|
AudioParameterFloat& AudioParameterFloat::operator= (float newValue)
|
|
|
AudioParameterFloat& AudioParameterFloat::operator= (float newValue)
|
|
|
{
|
|
|
{
|
|
|
const float normalisedValue = range.convertTo0to1 (newValue);
|
|
|
|
|
|
|
|
|
|
|
|
if (value != normalisedValue)
|
|
|
|
|
|
setValueNotifyingHost (normalisedValue);
|
|
|
|
|
|
|
|
|
if (value != newValue)
|
|
|
|
|
|
setValueNotifyingHost (range.convertTo0to1 (newValue));
|
|
|
|
|
|
|
|
|
return *this;
|
|
|
return *this;
|
|
|
}
|
|
|
}
|
|
@@ -92,10 +90,8 @@ String AudioParameterInt::getText (float v, int /*length*/) const { retur |
|
|
|
|
|
|
|
|
AudioParameterInt& AudioParameterInt::operator= (int newValue)
|
|
|
AudioParameterInt& AudioParameterInt::operator= (int newValue)
|
|
|
{
|
|
|
{
|
|
|
const float normalisedValue = convertTo0to1 (newValue);
|
|
|
|
|
|
|
|
|
|
|
|
if (value != normalisedValue)
|
|
|
|
|
|
setValueNotifyingHost (normalisedValue);
|
|
|
|
|
|
|
|
|
if (get() != newValue)
|
|
|
|
|
|
setValueNotifyingHost (convertTo0to1 (newValue));
|
|
|
|
|
|
|
|
|
return *this;
|
|
|
return *this;
|
|
|
}
|
|
|
}
|
|
@@ -120,10 +116,8 @@ String AudioParameterBool::getText (float v, int /*length*/) const { retur |
|
|
|
|
|
|
|
|
AudioParameterBool& AudioParameterBool::operator= (bool newValue)
|
|
|
AudioParameterBool& AudioParameterBool::operator= (bool newValue)
|
|
|
{
|
|
|
{
|
|
|
const float normalisedValue = newValue ? 1.0f : 0.0f;
|
|
|
|
|
|
|
|
|
|
|
|
if (value != normalisedValue)
|
|
|
|
|
|
setValueNotifyingHost (normalisedValue);
|
|
|
|
|
|
|
|
|
if (get() != newValue)
|
|
|
|
|
|
setValueNotifyingHost (newValue ? 1.0f : 0.0f);
|
|
|
|
|
|
|
|
|
return *this;
|
|
|
return *this;
|
|
|
}
|
|
|
}
|
|
@@ -153,10 +147,8 @@ String AudioParameterChoice::getText (float v, int /*length*/) const { retur |
|
|
|
|
|
|
|
|
AudioParameterChoice& AudioParameterChoice::operator= (int newValue)
|
|
|
AudioParameterChoice& AudioParameterChoice::operator= (int newValue)
|
|
|
{
|
|
|
{
|
|
|
const float normalisedValue = convertTo0to1 (newValue);
|
|
|
|
|
|
|
|
|
|
|
|
if (value != normalisedValue)
|
|
|
|
|
|
setValueNotifyingHost (normalisedValue);
|
|
|
|
|
|
|
|
|
if (getIndex() != newValue)
|
|
|
|
|
|
setValueNotifyingHost (convertTo0to1 (newValue));
|
|
|
|
|
|
|
|
|
return *this;
|
|
|
return *this;
|
|
|
}
|
|
|
}
|