SiP and "solo overrides mutes" tweak:
authorRobin Gareus <robin@gareus.org>
Mon, 5 Oct 2015 12:19:32 +0000 (14:19 +0200)
committerRobin Gareus <robin@gareus.org>
Mon, 5 Oct 2015 12:19:32 +0000 (14:19 +0200)
Only Explicit solos should override mutes.

libs/ardour/ardour/mute_master.h
libs/ardour/mute_master.cc
libs/ardour/route.cc

index 8a83352a5bbd04f682db376a545057139ec418d6..d88cbdcd39cad8563a82f5287ff07cbe8430cdce 100644 (file)
@@ -62,7 +62,8 @@ class LIBARDOUR_API MuteMaster : public SessionHandleRef, public PBD::Stateful
        void set_mute_points (MutePoint);
        MutePoint mute_points() const { return _mute_point; }
 
-       void set_soloed (bool);
+       void set_soloed_by_self (bool yn) { _soloed_by_self = yn; }
+       void set_soloed_by_others (bool yn) { _soloed_by_others = yn; }
        void set_solo_ignore (bool yn) { _solo_ignore = yn; }
 
        PBD::Signal0<void> MutePointChanged;
@@ -73,7 +74,8 @@ class LIBARDOUR_API MuteMaster : public SessionHandleRef, public PBD::Stateful
   private:
        volatile MutePoint _mute_point;
        volatile bool      _muted_by_self;
-       volatile bool      _soloed;
+       volatile bool      _soloed_by_self;
+       volatile bool      _soloed_by_others;
        volatile bool      _solo_ignore;
 };
 
index 4c23855915a519e8bb4a28dbe50786762054db1c..8f81a5e672058f98fb4e92470c1deb86175f0c87 100644 (file)
@@ -38,7 +38,8 @@ MuteMaster::MuteMaster (Session& s, const std::string&)
        : SessionHandleRef (s)
        , _mute_point (MutePoint (0))
         , _muted_by_self (false)
-        , _soloed (false)
+        , _soloed_by_self (false)
+        , _soloed_by_others (false)
         , _solo_ignore (false)
 {
 
@@ -77,24 +78,18 @@ MuteMaster::unmute_at (MutePoint mp)
        }
 }
 
-void
-MuteMaster::set_soloed (bool yn)
-{
-        _soloed = yn;
-}
-
 gain_t
 MuteMaster::mute_gain_at (MutePoint mp) const
 {
         gain_t gain;
 
         if (Config->get_solo_mute_override()) {
-                if (_soloed) {
+                if (_soloed_by_self) {
                         gain = GAIN_COEFF_UNITY;
                 } else if (muted_by_self_at (mp)) {
                         gain = GAIN_COEFF_ZERO;
                 } else {
-                        if (muted_by_others_at (mp)) {
+                        if (muted_by_others_at (mp) && !_soloed_by_others) {
                                 gain = Config->get_solo_mute_gain ();
                         } else {
                                 gain = GAIN_COEFF_UNITY;
@@ -103,7 +98,7 @@ MuteMaster::mute_gain_at (MutePoint mp) const
         } else {
                 if (muted_by_self_at (mp)) {
                         gain = GAIN_COEFF_ZERO;
-                } else if (_soloed) {
+                } else if (_soloed_by_self || _soloed_by_others) {
                         gain = GAIN_COEFF_UNITY;
                 } else {
                         if (muted_by_others_at (mp)) {
index 8f845bb8c99d214ab1cadd0efe3d5cd53e65b1b0..74c00409c7881ecfe76cb041e9b717131db214c0 100644 (file)
@@ -779,11 +779,12 @@ Route::set_listen (bool yn, void* src)
                if (yn != _monitor_send->active()) {
                        if (yn) {
                                _monitor_send->activate ();
-                               _mute_master->set_soloed (true);
+                               _mute_master->set_soloed_by_self (true);
                        } else {
                                _monitor_send->deactivate ();
-                               _mute_master->set_soloed (false);
+                               _mute_master->set_soloed_by_self (false);
                        }
+                       _mute_master->set_soloed_by_others (false);
 
                        listen_changed (src); /* EMIT SIGNAL */
                }
@@ -949,7 +950,8 @@ Route::mod_solo_by_others_downstream (int32_t delta)
 void
 Route::set_mute_master_solo ()
 {
-       _mute_master->set_soloed (self_soloed() || soloed_by_others_downstream() || soloed_by_others_upstream());
+       _mute_master->set_soloed_by_self (self_soloed());
+       _mute_master->set_soloed_by_others (soloed_by_others_downstream() || soloed_by_others_upstream());
 }
 
 void