Skip to content

Commit

Permalink
APVTS: Improved the default string displayed for parameter values
Browse files Browse the repository at this point in the history
  • Loading branch information
tpoole committed Jun 11, 2018
1 parent 7063d9a commit d3cada1
Showing 1 changed file with 4 additions and 3 deletions.
Expand Up @@ -68,10 +68,11 @@ struct AudioProcessorValueTreeState::Parameter : public AudioProcessorParamete
: text.getFloatValue());
}

String getText (float v, int length) const override
String getText (float normalisedValue, int length) const override
{
return valueToTextFunction != nullptr ? valueToTextFunction (range.convertFrom0to1 (v))
: AudioProcessorParameter::getText (v, length);
auto value = range.convertFrom0to1 (normalisedValue);
return valueToTextFunction != nullptr ? valueToTextFunction (value)
: AudioProcessorParameter::getText (value, length);
}

int getNumSteps() const override
Expand Down

0 comments on commit d3cada1

Please sign in to comment.