Change last commit to use it's own variable rather than borrowing solo's
authorLen Ovens <len@ovenwerks.net>
Sat, 16 Jan 2016 22:40:03 +0000 (14:40 -0800)
committerLen Ovens <len@ovenwerks.net>
Sat, 16 Jan 2016 22:40:03 +0000 (14:40 -0800)
libs/ardour/ardour/session.h
libs/ardour/session.cc

index 385eadbadf54f951f5814a8e8a1f763414a8b4c8..afc93a9f76de882ae2d5421ddae44104217f3adb 100644 (file)
@@ -1107,6 +1107,7 @@ class LIBARDOUR_API Session : public PBD::StatefulDestructible, public PBD::Scop
        framecnt_t              _worst_track_latency;
        bool                    _have_captured;
        bool                    _non_soloed_outs_muted;
+       bool                    _listening;
        uint32_t                _listen_cnt;
        uint32_t                _solo_isolated_cnt;
        bool                    _writable;
index fc6cc4b63307057c1651fdef60dd6ba5bc010a80..43883f7fc638cf61a724e0daf8f1096c6f5f9933 100644 (file)
@@ -183,6 +183,7 @@ Session::Session (AudioEngine &eng,
        , _worst_track_latency (0)
        , _have_captured (false)
        , _non_soloed_outs_muted (false)
+       , _listening (false)
        , _listen_cnt (0)
        , _solo_isolated_cnt (0)
        , _writable (false)
@@ -3740,6 +3741,7 @@ Session::update_route_solo_state (boost::shared_ptr<RouteList> r)
        /* now figure out if anything that matters is soloed (or is "listening")*/
 
        bool something_soloed = false;
+       bool something_listening = false;
        uint32_t listeners = 0;
        uint32_t isolated = 0;
 
@@ -3755,7 +3757,7 @@ Session::update_route_solo_state (boost::shared_ptr<RouteList> r)
                if (!(*i)->is_auditioner() && (*i)->listening_via_monitor()) {
                        if (Config->get_solo_control_is_listen_control()) {
                                listeners++;
-                               something_soloed = true;
+                               something_listening = true;
                        } else {
                                (*i)->set_listen (false, this);
                        }
@@ -3771,6 +3773,11 @@ Session::update_route_solo_state (boost::shared_ptr<RouteList> r)
                SoloActive (_non_soloed_outs_muted); /* EMIT SIGNAL */
        }
 
+       if (something_listening != _listening) {
+               _listening = something_listening;
+               SoloActive (_listening);
+       }
+
        _listen_cnt = listeners;
 
        if (isolated != _solo_isolated_cnt) {