mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
LV2 Host: For parameters with scale points, correctly convert values to text
This commit is contained in:
parent
d066a0b694
commit
ceb601af64
1 changed files with 2 additions and 1 deletions
|
|
@ -2507,7 +2507,7 @@ public:
|
|||
// In this case, we find the closest label by searching the midpoints of the scale
|
||||
// point values.
|
||||
const auto index = std::distance (midPoints.begin(),
|
||||
std::lower_bound (midPoints.begin(), midPoints.end(), normalisedValue));
|
||||
std::lower_bound (midPoints.begin(), midPoints.end(), denormalised));
|
||||
jassert (isPositiveAndBelow (index, info.scalePoints.size()));
|
||||
return info.scalePoints[(size_t) index].label;
|
||||
}
|
||||
|
|
@ -2549,6 +2549,7 @@ private:
|
|||
return {};
|
||||
|
||||
std::vector<float> result;
|
||||
result.reserve (set.size() - 1);
|
||||
|
||||
for (auto it = std::next (set.begin()); it != set.end(); ++it)
|
||||
result.push_back ((std::prev (it)->value + it->value) * 0.5f);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue