more solo model work, including a GUI fix for mute button state when the route is...
authorPaul Davis <paul@linuxaudiosystems.com>
Mon, 3 May 2010 18:58:38 +0000 (18:58 +0000)
committerPaul Davis <paul@linuxaudiosystems.com>
Mon, 3 May 2010 18:58:38 +0000 (18:58 +0000)
git-svn-id: svn://localhost/ardour2/branches/3.0@7048 d708f5d6-7413-0410-9779-e7cbd77b26cf

gtk2_ardour/route_ui.cc
libs/ardour/ardour/mute_master.h
libs/ardour/delivery.cc
libs/ardour/mute_master.cc
libs/ardour/route.cc

index e6c8fbf57430cf883a30abdfc4481f73e3888fa0..0aa158289649f055b53d15988e44e98e61ca5533 100644 (file)
@@ -838,7 +838,7 @@ RouteUI::mute_visual_state (Session* s, boost::shared_ptr<Route> r)
                if (r->self_muted ()) {
                        /* full mute */
                        return 2;
-               } else if (r->muted_by_others() || r->path_muted_by_others()) {
+               } else if (!r->self_soloed() && (r->muted_by_others() || r->path_muted_by_others())) {
                        return 1;
                } else {
                        /* no mute at all */
index a0207f9817e83180354b6b28afd7f8ee659500bc..ad383d88339668ba7197c00b959eff4e5881d380 100644 (file)
@@ -72,6 +72,7 @@ class MuteMaster : public SessionHandleRef, public PBD::Stateful
         MutePoint mute_points() const { return _mute_point; }
 
         void set_solo_level (SoloLevel);
+        void set_solo_ignore (bool yn) { _solo_ignore = yn; }
 
        PBD::Signal0<void> MutePointChanged;
 
@@ -83,6 +84,7 @@ class MuteMaster : public SessionHandleRef, public PBD::Stateful
         volatile bool      _self_muted;
         volatile uint32_t  _muted_by_others;
         volatile SoloLevel _solo_level;
+        volatile bool      _solo_ignore;
 };
 
 } // namespace ARDOUR
index 5861e5ea2c70d3c0858b05c0e609bda92b45da7c..a1aa968a040b5cbc05b292e5d800d2d7333b014f 100644 (file)
@@ -500,7 +500,7 @@ Delivery::target_gain ()
                 break;
         }
 
-        // cerr << name() << ' ';
+        //cerr << name() << ' ';
         desired_gain = _mute_master->mute_gain_at (mp);
         
         if (_role == Listen && _session.monitor_out() && !_session.listening()) {
index df9a66ef7f60d9642c1eac0f114e1c4c8c08ac26..5e49a11875ad7fbd4b7f742d21fa42841f98bb3d 100644 (file)
@@ -40,6 +40,7 @@ MuteMaster::MuteMaster (Session& s, const std::string&)
         , _mute_point (AllPoints)
         , _self_muted (false)
         , _muted_by_others (0)
+        , _solo_ignore (false)
 {
 }
 
@@ -107,7 +108,11 @@ MuteMaster::mute_gain_at (MutePoint mp) const
                 } else if (muted_by_others_at (mp)) { // muted by others
                         gain = Config->get_solo_mute_gain ();
                 } else {
-                        gain = 1.0;
+                        if (!_solo_ignore && _session.soloing()) {
+                                gain = 0.0;
+                        } else {
+                                gain = 1.0;
+                        }
                 }
         } else {
                 if (self_muted_at (mp)) { // self-muted 
@@ -119,10 +124,14 @@ MuteMaster::mute_gain_at (MutePoint mp) const
                 } else if (l == UpstreamSoloed) { // soloed by others
                         gain = 1.0;
                 } else {
-                        gain = 1.0;
+                        if (!_solo_ignore && _session.soloing()) {
+                                gain = 0.0;
+                        } else {
+                                gain = 1.0;
+                        }
                 }
         }
-
+        
         // cerr << "\tgain = " << gain << endl;
         
         return gain;
index ddb227c6bbbee511f7595c25dd474d60607e0bec..33af0f8abfc199d0046f3d506ad8ae1c3c4eb735 100644 (file)
@@ -165,6 +165,10 @@ Route::init ()
                 _main_outs->panner()->set_bypassed (true);
        }
 
+        if (is_master() || is_monitor() || is_hidden()) {
+                _mute_master->set_solo_ignore (true);
+        }
+
        /* now that we have _meter, its safe to connect to this */
 
        Metering::Meter.connect_same_thread (*this, (boost::bind (&Route::meter, this)));
@@ -1795,6 +1799,10 @@ Route::_set_state (const XMLNode& node, int version, bool /*call_base*/)
                _flags = Flag (0);
        }
 
+        if (is_master() || is_monitor() || is_hidden()) {
+                _mute_master->set_solo_ignore (true);
+        }
+
        /* add all processors (except amp, which is always present) */
 
        nlist = node.children();