diff options
Diffstat (limited to 'libs/ardour/automatable.cc')
-rw-r--r-- | libs/ardour/automatable.cc | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/libs/ardour/automatable.cc b/libs/ardour/automatable.cc index 466899ce48..b4d957c8b6 100644 --- a/libs/ardour/automatable.cc +++ b/libs/ardour/automatable.cc @@ -35,6 +35,7 @@ #include "ardour/plugin_insert.h" #include "ardour/session.h" #include "ardour/uri_map.h" +#include "ardour/value_as_string.h" #include "i18n.h" @@ -474,19 +475,5 @@ Automatable::clear_controls () string Automatable::value_as_string (boost::shared_ptr<AutomationControl> ac) const { - std::stringstream s; - - /* this is a the default fallback for this virtual method. Derived Automatables - are free to override this to display the values of their parameters/controls - in different ways. - */ - - // Hack to display CC as integer value, rather than double - if (ac->parameter().type() == MidiCCAutomation) { - s << lrint (ac->get_value()); - } else { - s << std::fixed << std::setprecision(3) << ac->get_value(); - } - - return s.str (); + return ARDOUR::value_as_string(ac->desc(), ac->get_value()); } |