Make Soundcloud upload applicable to any export format.
[ardour.git] / libs / ardour / monitor_processor.cc
index 835bfde70faf261d8d00981bbbbd260a934ea94d..ed0664786034059ed8c417590d78dc2645f41cdf 100644 (file)
@@ -1,3 +1,22 @@
+/*
+    Copyright (C) 2010 Paul Davis
+
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 2 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program; if not, write to the Free Software
+    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+
 #include "pbd/convert.h"
 #include "pbd/error.h"
 #include "pbd/locale_guard.h"
@@ -36,11 +55,12 @@ MonitorProcessor::MonitorProcessor (Session& s)
         , _mono_ptr (new MPControl<bool> (false, _("monitor mono"), Controllable::Toggle))
         , _dim_level_ptr (new MPControl<volatile gain_t> 
                          /* default is -12dB, range is -20dB to 0dB */
-                          (0.251188635826, _("monitor dim level"), Controllable::Flag (0), 0.100000001490, 1.0))
+                          (dB_to_coefficient(-12.0), _("monitor dim level"), Controllable::Flag (0), 
+                          dB_to_coefficient(-20.0), dB_to_coefficient (0.0)))
         , _solo_boost_level_ptr (new MPControl<volatile gain_t> 
                                 /* default is 0dB, range is 0dB to +20dB */
-                                 (1.0, _("monitor solo boost level"), Controllable::Flag (0), 1.0, 10.0))
-         
+                                 (dB_to_coefficient(0.0), _("monitor solo boost level"), Controllable::Flag (0), 
+                                 dB_to_coefficient(0.0), dB_to_coefficient(10.0)))
         , _dim_all_control (_dim_all_ptr)
         , _cut_all_control (_cut_all_ptr)
         , _mono_control (_mono_ptr)
@@ -335,7 +355,7 @@ MonitorProcessor::configure_io (ChanCount in, ChanCount out)
 }
 
 bool
-MonitorProcessor::can_support_io_configuration (const ChanCount& in, ChanCount& out) const
+MonitorProcessor::can_support_io_configuration (const ChanCount& in, ChanCount& out)
 {
        out = in;
        return true;
@@ -491,7 +511,7 @@ MonitorProcessor::ChannelRecord::ChannelRecord (uint32_t chn)
        : current_gain (1.0)
        , cut_ptr (new MPControl<gain_t> (1.0, string_compose (_("cut control %1"), chn), PBD::Controllable::GainLike))
        , dim_ptr (new MPControl<bool> (false, string_compose (_("dim control"), chn), PBD::Controllable::Toggle))
-       , polarity_ptr (new MPControl<gain_t> (1.0, string_compose (_("polarity control"), chn), PBD::Controllable::Toggle))
+       , polarity_ptr (new MPControl<gain_t> (1.0, string_compose (_("polarity control"), chn), PBD::Controllable::Toggle, -1, 1))
        , soloed_ptr (new MPControl<bool> (false, string_compose (_("solo control"), chn), PBD::Controllable::Toggle))
 
        , cut_control (cut_ptr)