fixed double application of gain on tracks/busses with bypassed panners
authorJesse Chappell <jesse@essej.net>
Tue, 17 Oct 2006 21:45:20 +0000 (21:45 +0000)
committerJesse Chappell <jesse@essej.net>
Tue, 17 Oct 2006 21:45:20 +0000 (21:45 +0000)
git-svn-id: svn://localhost/ardour2/trunk@990 d708f5d6-7413-0410-9779-e7cbd77b26cf

libs/ardour/ardour/io.h
libs/ardour/io.cc
libs/ardour/route.cc

index e59ec6c23d04e3df6d950f0c3bbb32896583159b..96ae75f29811345c2f4f532b995d7491fb0a65f9 100644 (file)
@@ -273,7 +273,9 @@ public:
        Connection*         _output_connection;
        bool                 no_panner_reset;
        XMLNode*             deferred_state;
-       DataType        _default_type;
+       DataType            _default_type;
+       bool                _ignore_gain_on_deliver;
+       
 
        virtual void set_deferred_state() {}
 
index b6c3648cdad2217c2a7484e9714e313ac3d0cdab..bcd3ee794026d5d87d81be0636b31ecda2f3b17b 100644 (file)
@@ -125,7 +125,8 @@ IO::IO (Session& s, string name,
        deferred_state = 0;
 
        apply_gain_automation = false;
-
+       _ignore_gain_on_deliver = false;
+       
        _gain_automation_state = Off;
        _gain_automation_style = Absolute;
 
@@ -431,7 +432,7 @@ IO::deliver_output_no_pan (vector<Sample *>& bufs, uint32_t nbufs, nframes_t nfr
        gain_t dg;
        gain_t old_gain = _gain;
 
-       if (apply_gain_automation) {
+       if (apply_gain_automation || _ignore_gain_on_deliver) {
 
                /* gain has already been applied by automation code. do nothing here except
                   speed quietning.
@@ -498,7 +499,7 @@ IO::deliver_output_no_pan (vector<Sample *>& bufs, uint32_t nbufs, nframes_t nfr
                _gain = dg;
        }
 
-       if (apply_gain_automation) {
+       if (apply_gain_automation || _ignore_gain_on_deliver) {
                _gain = old_gain;
        }
 }
index 87493e540021fcc780d6346272c6c91a711bf0c3..782cb1c69e7144ebdf10ebc89facc40989fc7c5b 100644 (file)
@@ -89,7 +89,8 @@ Route::init ()
        _declickable = false;
        _pending_declick = true;
        _remote_control_id = 0;
-
+       _ignore_gain_on_deliver = true;
+       
        _edit_group = 0;
        _mix_group = 0;