add implicit mute state to MuteMaster and use when a master of a mute control is...
[ardour.git] / libs / ardour / mute_master.cc
index 4b83d57a9b6f126a8f4089193504fd9a45891a4a..dc40d1fd6b596b1dd3e3d9d371dec4196d5207d0 100644 (file)
@@ -41,6 +41,7 @@ MuteMaster::MuteMaster (Session& s, const std::string&)
         , _soloed_by_self (false)
         , _soloed_by_others (false)
         , _solo_ignore (false)
+       , _muted_by_others (0)
 {
 
        if (Config->get_mute_affects_pre_fader ()) {
@@ -163,6 +164,11 @@ MuteMaster::get_state()
 bool
 MuteMaster::muted_by_others_at (MutePoint mp) const
 {
-       return (!_solo_ignore && _session.soloing() && (_mute_point & mp));
+       return (!_solo_ignore && (_muted_by_others || _session.soloing()) && (_mute_point & mp));
 }
 
+void
+MuteMaster::mod_muted_by_others (int32_t delta)
+{
+       _muted_by_others = max (0, _muted_by_others + delta);
+}