diff options
author | Robin Gareus <robin@gareus.org> | 2014-11-30 15:03:36 +0100 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2014-11-30 15:05:39 +0100 |
commit | fb3f9033cfdb22e8d8651d95617cb51258eff3d4 (patch) | |
tree | 898bb25e7c8e6ff0bb9ae919f91ef06dfa252b0c /libs/ardour | |
parent | 0622fc9d4b3589ef00a09a5f69515d8619fa051f (diff) |
use update_steps() instead of custom function
Diffstat (limited to 'libs/ardour')
-rw-r--r-- | libs/ardour/audio_unit.cc | 4 | ||||
-rw-r--r-- | libs/ardour/ladspa_plugin.cc | 13 |
2 files changed, 2 insertions, 15 deletions
diff --git a/libs/ardour/audio_unit.cc b/libs/ardour/audio_unit.cc index 3024c55f43..21f2a78be0 100644 --- a/libs/ardour/audio_unit.cc +++ b/libs/ardour/audio_unit.cc @@ -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); diff --git a/libs/ardour/ladspa_plugin.cc b/libs/ardour/ladspa_plugin.cc index fca37441af..8b2a4f75df 100644 --- a/libs/ardour/ladspa_plugin.cc +++ b/libs/ardour/ladspa_plugin.cc @@ -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; } |