13
0

use update_steps() instead of custom function

This commit is contained in:
Robin Gareus 2014-11-30 15:03:36 +01:00
parent 0622fc9d4b
commit fb3f9033cf
2 changed files with 2 additions and 15 deletions

View File

@ -619,11 +619,9 @@ AUPlugin::discover_parameters ()
d.logarithmic = (info.flags & kAudioUnitParameterFlag_DisplayLogarithmic);
d.unit = info.unit;
d.step = 1.0;
d.smallstep = 0.1;
d.largestep = 10.0;
d.min_unbound = 0; // lower is bound
d.max_unbound = 0; // upper is bound
d.update_steps();
descriptors.push_back (d);

View File

@ -504,18 +504,6 @@ LadspaPlugin::get_parameter_descriptor (uint32_t which, ParameterDescriptor& des
desc.upper = 4; /* completely arbitrary */
}
if (LADSPA_IS_HINT_INTEGER (prh.HintDescriptor)) {
desc.step = 1.0;
desc.smallstep = 0.1;
desc.largestep = 10.0;
} else {
float delta = desc.upper - desc.lower;
desc.step = delta / 1000.0f;
desc.smallstep = delta / 10000.0f;
desc.largestep = delta/10.0f;
}
if (LADSPA_IS_HINT_HAS_DEFAULT (prh.HintDescriptor)) {
desc.normal = _default_value(which);
} else {
@ -534,6 +522,7 @@ LadspaPlugin::get_parameter_descriptor (uint32_t which, ParameterDescriptor& des
desc.label = port_names()[which];
desc.scale_points = get_scale_points(which);
desc.update_steps();
return 0;
}