diff options
author | Robin Gareus <robin@gareus.org> | 2017-06-21 17:05:03 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2017-06-21 18:13:41 +0200 |
commit | 55df5b39bc5ff2fc4efabb78d701e8a9e3d56b47 (patch) | |
tree | 06871e4ef22033be0e123f34f75c9d899f9cc823 /libs/surfaces | |
parent | 8cd8cb165037906d5a35c8e147785845d0f4f808 (diff) |
Prepare removal of redundant get_user/set_user API.
Diffstat (limited to 'libs/surfaces')
-rw-r--r-- | libs/surfaces/faderport/faderport.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libs/surfaces/faderport/faderport.cc b/libs/surfaces/faderport/faderport.cc index 9debc72f6f..8e106c7948 100644 --- a/libs/surfaces/faderport/faderport.cc +++ b/libs/surfaces/faderport/faderport.cc @@ -459,9 +459,9 @@ FaderPort::encoder_handler (MIDI::Parser &, MIDI::pitchbend_t pb) if ((button_state & trim_modifier) == trim_modifier ) { // mod+encoder = input trim boost::shared_ptr<AutomationControl> trim = _current_stripable->trim_control (); if (trim) { - float val = trim->get_user(); //for gain elements, the "user" value is in dB - val += delta; - trim->set_user(val); + float val = accurate_coefficient_to_dB (trim->get_value()); + val += delta * .5f; // use 1/2 dB Steps -20..+20 + trim->set_value (dB_to_coefficient (val), Controllable::UseGroup); } } else if (width_modifier && ((button_state & width_modifier) == width_modifier)) { ardour_pan_width (delta); |