diff options
author | Robin Gareus <robin@gareus.org> | 2017-06-19 00:57:53 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2017-06-21 18:12:04 +0200 |
commit | 567c0a8f5321f70f13e8e0c4c78725ce4521608b (patch) | |
tree | 343c5178af230a8ca1ec7644500ffc17344cd3c5 /libs/ardour/parameter_descriptor.cc | |
parent | e91b80eb85452586f226f4b7eb84d8be36ea1a3c (diff) |
Switch to PBD control-math and prefer Controllable API
Note: Control-surfaces should always use interface_to_internal()
and internal_to_interface().
Diffstat (limited to 'libs/ardour/parameter_descriptor.cc')
-rw-r--r-- | libs/ardour/parameter_descriptor.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libs/ardour/parameter_descriptor.cc b/libs/ardour/parameter_descriptor.cc index 16c618dec6..f6460a514e 100644 --- a/libs/ardour/parameter_descriptor.cc +++ b/libs/ardour/parameter_descriptor.cc @@ -19,6 +19,8 @@ #include <boost/algorithm/string.hpp> +#include "pbd/control_math.h" + #include "ardour/amp.h" #include "ardour/dB.h" #include "ardour/parameter_descriptor.h" @@ -157,8 +159,8 @@ ParameterDescriptor::update_steps() /* dB_coeff_step gives a step normalized for [0, max_gain]. This is like "slider position", so we convert from "slider position" to gain to have the correct unit here. */ - largestep = slider_position_to_gain(dB_coeff_step(upper)); - step = slider_position_to_gain(largestep / 10.0); + largestep = position_to_gain (dB_coeff_step(upper)); + step = position_to_gain (largestep / 10.0); smallstep = step; } else { /* note that LV2Plugin::get_parameter_descriptor () |