NOOP, whitespace change only
[ardour.git] / libs / ardour / amp.cc
index 94204a1a84b7133375eeff60de00f2145aa2b0cd..132be2e1c6db4c9cf8efa2066730b77dd885a34d 100644 (file)
@@ -61,7 +61,7 @@ Amp::display_name() const
 }
 
 bool
-Amp::can_support_io_configuration (const ChanCount& in, ChanCount& out) const
+Amp::can_support_io_configuration (const ChanCount& in, ChanCount& out)
 {
        out = in;
        return true;
@@ -372,19 +372,9 @@ Amp::inc_gain (gain_t factor, void *src)
 }
 
 void
-Amp::set_gain (gain_t val, void *src)
+Amp::set_gain (gain_t val, void *)
 {
-       val = min (val, max_gain_coefficient);
-
-       if (src != _gain_control.get()) {
-               _gain_control->set_value (val);
-               // bit twisty, this will come back and call us again
-               // (this keeps control in sync with reality)
-               return;
-       }
-
-       _gain_control->set_double (val);
-       _session.set_dirty();
+       _gain_control->set_value (val);
 }
 
 XMLNode&
@@ -414,14 +404,8 @@ Amp::set_state (const XMLNode& node, int version)
 void
 Amp::GainControl::set_value (double val)
 {
-       // max gain at about +6dB (10.0 ^ ( 6 dB * 0.05))
-       if (val > 1.99526231) {
-               val = 1.99526231;
-       }
-
-       _amp->set_gain (val, this);
-
-       AutomationControl::set_value(val);
+       AutomationControl::set_value (min (val, (double) max_gain_coefficient));
+       _amp->session().set_dirty ();
 }
 
 double