mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-26 02:14:22 +00:00
LV2 Host: Ensure default parameter value lies between min and max when not explicitly provided
This commit is contained in:
parent
e85a6b595e
commit
e68a62af7f
1 changed files with 6 additions and 3 deletions
|
|
@ -4101,11 +4101,14 @@ static SupportedParameter getInfoForPatchParameter (World& worldIn,
|
|||
jassertfalse; // A ScalePoint must have both a rdfs:label and a rdf:value
|
||||
}
|
||||
|
||||
const auto minimum = getValue (LV2_CORE__minimum, 0.0f);
|
||||
const auto maximum = getValue (LV2_CORE__maximum, 1.0f);
|
||||
|
||||
return { { std::move (parsedScalePoints),
|
||||
"des:" + String::fromUTF8 (property.getTyped()),
|
||||
getValue (LV2_CORE__default, 0.0f),
|
||||
getValue (LV2_CORE__minimum, 0.0f),
|
||||
getValue (LV2_CORE__maximum, 1.0f),
|
||||
getValue (LV2_CORE__default, (minimum + maximum) * 0.5f),
|
||||
minimum,
|
||||
maximum,
|
||||
typeUrid == urids.mLV2_ATOM__Bool || hasPortProperty (LV2_CORE__toggled),
|
||||
typeUrid == urids.mLV2_ATOM__Int || typeUrid == urids.mLV2_ATOM__Long,
|
||||
hasPortProperty (LV2_CORE__enumeration) },
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue