MuteMaster should (a) use a Muteable's own ::muted_by_others_soloing() (b) not try...
authorPaul Davis <paul@linuxaudiosystems.com>
Wed, 20 Jul 2016 20:10:11 +0000 (16:10 -0400)
committerPaul Davis <paul@linuxaudiosystems.com>
Wed, 20 Jul 2016 20:10:11 +0000 (16:10 -0400)
libs/ardour/ardour/mute_master.h
libs/ardour/mute_master.cc
libs/ardour/muteable.cc
libs/ardour/route.cc
libs/ardour/session.cc
libs/ardour/solo_isolate_control.cc

index 6f5999efb44c8b704a440061900400fe15d78b12..f73ce095650d518b0fef678cbcba06565170a64d 100644 (file)
@@ -33,6 +33,7 @@
 namespace ARDOUR {
 
 class Session;
 namespace ARDOUR {
 
 class Session;
+class Muteable;
 
 class LIBARDOUR_API MuteMaster : public SessionHandleRef, public PBD::Stateful
 {
 
 class LIBARDOUR_API MuteMaster : public SessionHandleRef, public PBD::Stateful
 {
@@ -47,7 +48,7 @@ class LIBARDOUR_API MuteMaster : public SessionHandleRef, public PBD::Stateful
 
        static const MutePoint AllPoints;
 
 
        static const MutePoint AllPoints;
 
-       MuteMaster (Session& s, const std::string& name);
+       MuteMaster (Session& s, Muteable&, const std::string& name);
        ~MuteMaster() {}
 
        bool muted_by_self () const { return _muted_by_self && (_mute_point != MutePoint (0)); }
        ~MuteMaster() {}
 
        bool muted_by_self () const { return _muted_by_self && (_mute_point != MutePoint (0)); }
@@ -69,7 +70,6 @@ class LIBARDOUR_API MuteMaster : public SessionHandleRef, public PBD::Stateful
 
        void set_soloed_by_self (bool yn) { _soloed_by_self = yn; }
        void set_soloed_by_others (bool yn) { _soloed_by_others = yn; }
 
        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; }
 
        void set_muted_by_masters (bool);
 
 
        void set_muted_by_masters (bool);
 
@@ -80,11 +80,11 @@ class LIBARDOUR_API MuteMaster : public SessionHandleRef, public PBD::Stateful
        static const std::string xml_node_name;
 
   private:
        static const std::string xml_node_name;
 
   private:
+       Muteable* _muteable;
        MutePoint _mute_point;
        bool      _muted_by_self;
        bool      _soloed_by_self;
        bool      _soloed_by_others;
        MutePoint _mute_point;
        bool      _muted_by_self;
        bool      _soloed_by_self;
        bool      _soloed_by_others;
-       bool      _solo_ignore;
        bool      _muted_by_masters;
 };
 
        bool      _muted_by_masters;
 };
 
index 29a2fe914337fb66f6ace750a04dc5de1387dfcc..ed77942f6c4ae03070930dc3b93e0630670ed05b 100644 (file)
@@ -36,13 +36,13 @@ const string MuteMaster::xml_node_name (X_("MuteMaster"));
 const MuteMaster::MutePoint MuteMaster::AllPoints = MuteMaster::MutePoint(
        PreFader|PostFader|Listen|Main);
 
 const MuteMaster::MutePoint MuteMaster::AllPoints = MuteMaster::MutePoint(
        PreFader|PostFader|Listen|Main);
 
-MuteMaster::MuteMaster (Session& s, const std::string&)
+MuteMaster::MuteMaster (Session& s, Muteable& m, const std::string&)
        : SessionHandleRef (s)
        : SessionHandleRef (s)
+       , _muteable (&m)
        , _mute_point (MutePoint (0))
         , _muted_by_self (false)
         , _soloed_by_self (false)
         , _soloed_by_others (false)
        , _mute_point (MutePoint (0))
         , _muted_by_self (false)
         , _soloed_by_self (false)
         , _soloed_by_others (false)
-        , _solo_ignore (false)
        , _muted_by_masters (0)
 {
 
        , _muted_by_masters (0)
 {
 
@@ -166,10 +166,7 @@ MuteMaster::get_state()
 bool
 MuteMaster::muted_by_others_soloing_at (MutePoint mp) const
 {
 bool
 MuteMaster::muted_by_others_soloing_at (MutePoint mp) const
 {
-       /* note: this is currently called with the assumption that the owner is
-          not soloed. it does not test for this condition.
-       */
-       return (!_solo_ignore && _session.soloing()) && (_mute_point & mp);
+       return _muteable->muted_by_others_soloing() && (_mute_point & mp);
 }
 
 void
 }
 
 void
index 9d434888bf5c425871e5bb0be745272136323f72..c94b55a6836fcb1df87b2bc8b358cfd7775bf35d 100644 (file)
@@ -22,6 +22,6 @@
 using namespace ARDOUR;
 
 Muteable::Muteable (Session& s, std::string const & name)
 using namespace ARDOUR;
 
 Muteable::Muteable (Session& s, std::string const & name)
-       : _mute_master (new MuteMaster (s, name))
+       : _mute_master (new MuteMaster (s, *this, name))
 {
 }
 {
 }
index d072d81c88e379d01e6fc8c7b2fc81db5c890d11..36d1791f9f22afff3787be34ff37eb1421702aa3 100644 (file)
@@ -229,10 +229,6 @@ Route::init ()
                _monitor_control->activate ();
        }
 
                _monitor_control->activate ();
        }
 
-       if (is_master() || is_monitor() || is_auditioner()) {
-               _mute_master->set_solo_ignore (true);
-       }
-
        /* now that we have _meter, its safe to connect to this */
 
        {
        /* now that we have _meter, its safe to connect to this */
 
        {
@@ -2352,10 +2348,6 @@ Route::set_state (const XMLNode& node, int version)
                _strict_io = string_is_affirmative (prop->value());
        }
 
                _strict_io = string_is_affirmative (prop->value());
        }
 
-       if (!can_solo()) {
-               _mute_master->set_solo_ignore (true);
-       }
-
        if (is_monitor()) {
                /* monitor bus does not get a panner, but if (re)created
                   via XML, it will already have one by the time we
        if (is_monitor()) {
                /* monitor bus does not get a panner, but if (re)created
                   via XML, it will already have one by the time we
@@ -2502,10 +2494,6 @@ Route::set_state_2X (const XMLNode& node, int version)
 
        Stripable::set_state (node, version);
 
 
        Stripable::set_state (node, version);
 
-       if (is_master() || is_monitor() || is_auditioner()) {
-               _mute_master->set_solo_ignore (true);
-       }
-
        if ((prop = node.property (X_("denormal-protection"))) != 0) {
                set_denormal_protection (string_is_affirmative (prop->value()));
        }
        if ((prop = node.property (X_("denormal-protection"))) != 0) {
                set_denormal_protection (string_is_affirmative (prop->value()));
        }
@@ -5262,7 +5250,7 @@ Route::muted_by_others_soloing () const
                return false;
        }
 
                return false;
        }
 
-       return _session.soloing() && !_solo_control->soloed() && !_solo_isolate_control->solo_isolated();
+       return  _session.soloing() && !_solo_control->soloed() && !_solo_isolate_control->solo_isolated();
 }
 
 void
 }
 
 void
index 444989789866504a85257be2c0b044fc9ef84cc0..63cd20a0c0a2752459c3b7ee9177bab973b6a949 100644 (file)
@@ -3903,6 +3903,8 @@ Session::route_solo_changed (bool self_solo_changed, Controllable::GroupControlD
 
                if ((*i)->solo_isolate_control()->solo_isolated() || !(*i)->can_solo()) {
                        /* route does not get solo propagated to it */
 
                if ((*i)->solo_isolate_control()->solo_isolated() || !(*i)->can_solo()) {
                        /* route does not get solo propagated to it */
+                       DEBUG_TRACE (DEBUG::Solo, string_compose ("%1 excluded from solo because iso = %2 can_solo = %3\n", (*i)->name(), (*i)->solo_isolate_control()->solo_isolated(),
+                                                                 (*i)->can_solo()));
                        continue;
                }
 
                        continue;
                }
 
index e4d551168b7f1437ae1bc2162dfbfd5b95667150..3be57dc23d4e52cf270ffce31e61026d0195cc5c 100644 (file)
@@ -84,8 +84,6 @@ SoloIsolateControl::mod_solo_isolated_by_upstream (int32_t delta)
        }
 
        if (solo_isolated() != old) {
        }
 
        if (solo_isolated() != old) {
-               /* solo isolated status changed */
-               _muteable.mute_master()->set_solo_ignore (solo_isolated());
                Changed (false, Controllable::NoGroup); /* EMIT SIGNAL */
        }
 }
                Changed (false, Controllable::NoGroup); /* EMIT SIGNAL */
        }
 }
@@ -118,14 +116,12 @@ SoloIsolateControl::set_solo_isolated (bool yn, Controllable::GroupControlDispos
 
        if (yn) {
                if (_solo_isolated == false) {
 
        if (yn) {
                if (_solo_isolated == false) {
-                       _muteable.mute_master()->set_solo_ignore (true);
                        changed = true;
                }
                _solo_isolated = true;
        } else {
                if (_solo_isolated == true) {
                        _solo_isolated = false;
                        changed = true;
                }
                _solo_isolated = true;
        } else {
                if (_solo_isolated == true) {
                        _solo_isolated = false;
-                       _muteable.mute_master()->set_solo_ignore (false);
                        changed = true;
                }
        }
                        changed = true;
                }
        }