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/gain_control.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/gain_control.cc')
-rw-r--r-- | libs/ardour/gain_control.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libs/ardour/gain_control.cc b/libs/ardour/gain_control.cc index 7b0f4e404c..35f666bdf1 100644 --- a/libs/ardour/gain_control.cc +++ b/libs/ardour/gain_control.cc @@ -50,7 +50,7 @@ double GainControl::internal_to_interface (double v) const { if (_desc.type == GainAutomation) { - return gain_to_slider_position (v); + return gain_to_slider_position_with_max (v, _desc.upper); } else { return (accurate_coefficient_to_dB (v) - lower_db) / range_db; } @@ -60,7 +60,7 @@ double GainControl::interface_to_internal (double v) const { if (_desc.type == GainAutomation) { - return slider_position_to_gain (v); + return slider_position_to_gain_with_max (v, _desc.upper); } else { return dB_to_coefficient (lower_db + v * range_db); } |