Fix VST default value. query once at instantiation time.
This commit is contained in:
@@ -390,9 +390,10 @@ VSTPlugin::get_parameter_descriptor (uint32_t which, ParameterDescriptor& desc)
|
||||
desc.largestep = 0.1f;
|
||||
}
|
||||
|
||||
desc.normal = get_parameter (which);
|
||||
if (_parameter_defaults.find (which) == _parameter_defaults.end ()) {
|
||||
_parameter_defaults[which] = desc.normal;
|
||||
_parameter_defaults[which] = get_parameter (which);
|
||||
} else {
|
||||
desc.normal = _parameter_defaults[which];
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user