Skip to content

Commit

Permalink
Fix default parameter value scaling
Browse files Browse the repository at this point in the history
  • Loading branch information
jd-13 committed Aug 1, 2020
1 parent d11c50b commit f626116
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion WECore/CoreJUCEPlugin/CoreAudioProcessor.h
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ namespace WECore::JUCEPlugin {
/** @{ */
inline void registerParameter(AudioParameterFloat*& param,
const String& name,
const ParameterDefinition::RangedParameter<double>* range,
float defaultValue,
std::function<void(float)> setter);

Expand Down Expand Up @@ -193,9 +194,10 @@ namespace WECore::JUCEPlugin {

void CoreAudioProcessor::registerParameter(AudioParameterFloat*& param,
const String& name,
const ParameterDefinition::RangedParameter<double>* range,
float defaultValue,
std::function<void(float)> setter) {
param = new AudioParameterFloat(name, name, 0.0f, 1.0f, defaultValue);
param = new AudioParameterFloat(name, name, 0.0f, 1.0f, range->InternalToNormalised(defaultValue));

ParameterInterface interface = {[&param]() { return param->get(); },
setter};
Expand Down

0 comments on commit f626116

Please sign in to comment.