diff options
author | Ben Loftis <ben@harrisonconsoles.com> | 2014-07-18 08:47:45 -0500 |
---|---|---|
committer | Ben Loftis <ben@harrisonconsoles.com> | 2014-07-18 08:47:45 -0500 |
commit | b2b736d596123de52dac700db769ac4eb576da5c (patch) | |
tree | c800fa5fd3a84d3c7b0749ba3edb5b9fd89629ed /libs/ardour/amp.cc | |
parent | ac9219a3c884b69352ff5ab0d13f30fb15cf8e6e (diff) |
tweaks for the monitor section. refactoring of some buttons, using new ArdourKnob instead of VolumeController. New ArdourDisplay shows a controllables user value, and provides support for preset values (hardcoded at present). Further refactoring to come, so that ArdourWidgets are derived from a common class. Controllable now has more responsibility for scaling between internal, user, and interface (knob percent) values. This also needs more refactoring and might have some unintended consequences. tested with audio and nothing seems amiss, yet.
Diffstat (limited to 'libs/ardour/amp.cc')
-rw-r--r-- | libs/ardour/amp.cc | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/libs/ardour/amp.cc b/libs/ardour/amp.cc index 29032525f2..2265c6de03 100644 --- a/libs/ardour/amp.cc +++ b/libs/ardour/amp.cc @@ -426,6 +426,19 @@ Amp::GainControl::internal_to_user (double v) const return accurate_coefficient_to_dB (v); } +double +Amp::GainControl::user_to_internal (double u) const +{ + return dB_to_coefficient (u); +} + +std::string +Amp::GainControl::get_user_string () const +{ + char theBuf[32]; sprintf( theBuf, "%3.1f dB", accurate_coefficient_to_dB (get_value())); + return std::string(theBuf); +} + /** Write gain automation for this cycle into the buffer previously passed in to * set_gain_automation_buffer (if we are in automation playback mode and the * transport is rolling). |