From 606a65321d72fe354db49f0c74a5c6968eb87a53 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Sun, 8 Aug 2010 02:19:20 +0000 Subject: Label panner automation sliders the same as panners. git-svn-id: svn://localhost/ardour2/branches/3.0@7563 d708f5d6-7413-0410-9779-e7cbd77b26cf --- libs/ardour/panner.cc | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'libs/ardour/panner.cc') diff --git a/libs/ardour/panner.cc b/libs/ardour/panner.cc index b224bf558e..c400199943 100644 --- a/libs/ardour/panner.cc +++ b/libs/ardour/panner.cc @@ -29,6 +29,7 @@ #include #include #include +#include #include @@ -1640,3 +1641,25 @@ Panner::set_mono (bool yn) (*i)->set_mono (yn); } } + +string +Panner::value_as_string (double v) +{ + if (Panner::equivalent (v, 0.5)) { + return _("C"); + } else if (equivalent (v, 0)) { + return _("L"); + } else if (equivalent (v, 1)) { + return _("R"); + } else if (v < 0.5) { + stringstream s; + s << fixed << setprecision (0) << _("L") << ((0.5 - v) * 200) << "%"; + return s.str(); + } else { + stringstream s; + s << fixed << setprecision (0) << _("R") << ((v -0.5) * 200) << "%"; + return s.str (); + } + + return ""; +} -- cgit v1.2.3