diff options
author | Robin Gareus <robin@gareus.org> | 2017-06-21 17:08:59 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2017-06-21 18:13:46 +0200 |
commit | ce059e2d661e4cc46b7e9bfcf1d5caef618d487a (patch) | |
tree | dc455e968671f99f92e51d32c9be3e5daba7bd3f /libs/ardour/gain_control.cc | |
parent | 55df5b39bc5ff2fc4efabb78d701e8a9e3d56b47 (diff) |
Remove internal_to_user/user_to_internal API
Also GainControl can just use the AutomationControl's implementation of
get_user_string()
Diffstat (limited to 'libs/ardour/gain_control.cc')
-rw-r--r-- | libs/ardour/gain_control.cc | 41 |
1 files changed, 0 insertions, 41 deletions
diff --git a/libs/ardour/gain_control.cc b/libs/ardour/gain_control.cc index 36a161059c..b734dedd01 100644 --- a/libs/ardour/gain_control.cc +++ b/libs/ardour/gain_control.cc @@ -40,47 +40,6 @@ GainControl::GainControl (Session& session, const Evoral::Parameter ¶m, boos param.type() == GainAutomation ? X_("gaincontrol") : X_("trimcontrol"), Controllable::GainLike) { - lower_db = accurate_coefficient_to_dB (_desc.lower); - range_db = accurate_coefficient_to_dB (_desc.upper) - lower_db; -} - -double -GainControl::internal_to_interface (double v) const -{ - if (_desc.type == GainAutomation) { - return gain_to_slider_position_with_max (v, _desc.upper); - } else { - return (accurate_coefficient_to_dB (v) - lower_db) / range_db; - } -} - -double -GainControl::interface_to_internal (double v) const -{ - if (_desc.type == GainAutomation) { - return slider_position_to_gain_with_max (v, _desc.upper); - } else { - return dB_to_coefficient (lower_db + v * range_db); - } -} - -double -GainControl::internal_to_user (double v) const -{ - return accurate_coefficient_to_dB (v); -} - -double -GainControl::user_to_internal (double u) const -{ - return dB_to_coefficient (u); -} - -std::string -GainControl::get_user_string () const -{ - char theBuf[32]; sprintf( theBuf, _("%3.1f dB"), accurate_coefficient_to_dB (get_value())); - return std::string(theBuf); } void |