some tweaks for solo logic to get things working as they were before (correctly)
authorPaul Davis <paul@linuxaudiosystems.com>
Sun, 10 Apr 2016 22:20:11 +0000 (18:20 -0400)
committerPaul Davis <paul@linuxaudiosystems.com>
Tue, 31 May 2016 19:30:40 +0000 (15:30 -0400)
gtk2_ardour/ardour_ui.cc
gtk2_ardour/route_ui.cc
libs/ardour/session.cc
libs/ardour/solo_control.cc

index 65b882fe6de1b81b49296dddc70119351fffb066..6ecfd9772c7116e5e21821e3c04f9bb110977918 100644 (file)
@@ -5589,6 +5589,9 @@ void
 ARDOUR_UI::cancel_solo ()
 {
        if (_session) {
+               if (_session) {
+                       _session->set_controls (route_list_to_control_list (_session->get_routes(), &Route::solo_control), 0.0, Controllable::NoGroup);
+               }
                _session->clear_all_solo_state (_session->get_routes()); // safeguard, ideally this won't do anything, check the log-window
        }
 }
index 1d5d8c731c4c3638bffd637361f2ac954abc4a57..730cc055149ab3e1b932b2054357a10ed1cae75d 100644 (file)
@@ -1116,7 +1116,7 @@ RouteUI::send_blink (bool onoff)
 Gtkmm2ext::ActiveState
 RouteUI::solo_active_state (boost::shared_ptr<Route> r)
 {
-       if (r->is_master() || r->is_monitor()) {
+       if (!r->can_solo()) {
                return Gtkmm2ext::Off;
        }
 
@@ -1207,7 +1207,7 @@ RouteUI::update_solo_display ()
         /* some changes to solo status can affect mute display, so catch up
          */
 
-        update_mute_display ();
+       update_mute_display ();
 }
 
 void
index 7658ff270d066bff56a95af88285f31559a0e7bf..7fec4bb931e8b36d39b7c463729d4f03da0af23e 100644 (file)
@@ -3774,8 +3774,6 @@ Session::route_solo_isolated_changed (boost::weak_ptr<Route> wpr)
 void
 Session::route_solo_changed (bool self_solo_change, Controllable::GroupControlDisposition group_override,  boost::weak_ptr<Route> wpr)
 {
-       cerr << "route solo change (self ? " << self_solo_change << endl;
-
        DEBUG_TRACE (DEBUG::Solo, string_compose ("route solo change, self = %1\n", self_solo_change));
 
        boost::shared_ptr<Route> route (wpr.lock());
@@ -3964,16 +3962,17 @@ Session::update_route_solo_state (boost::shared_ptr<RouteList> r)
        }
 
        for (RouteList::iterator i = r->begin(); i != r->end(); ++i) {
-               if ((*i)->can_solo() && (*i)->self_soloed()) {
-                       something_soloed = true;
-               }
-
-               if (!(*i)->is_auditioner() && (*i)->listening_via_monitor()) {
+               if ((*i)->can_solo()) {
                        if (Config->get_solo_control_is_listen_control()) {
-                               listeners++;
-                               something_listening = true;
+                               if ((*i)->self_soloed()) {
+                                       listeners++;
+                                       something_listening = true;
+                               }
                        } else {
                                (*i)->set_listen (false);
+                               if ((*i)->can_solo() && (*i)->self_soloed()) {
+                                       something_soloed = true;
+                               }
                        }
                }
 
@@ -6118,8 +6117,16 @@ Session::listen_position_changed ()
 void
 Session::solo_control_mode_changed ()
 {
-       /* cancel all solo or all listen when solo control mode changes */
-       clear_all_solo_state (get_routes());
+       if (soloing()) {
+               /* We can't use ::clear_all_solo_state() here because during
+                  session loading at program startup, that will queue a call
+                  to rt_clear_all_solo_state() that will not execute until
+                  AFTER solo states have been established (thus throwing away
+                  the session's saved solo state). So just explicitly turn
+                  them all off.
+               */
+               set_controls (route_list_to_control_list (get_routes(), &Route::solo_control), 0.0, Controllable::NoGroup);
+       }
 }
 
 /** Called when a property of one of our route groups changes */
index 45ec5b90ec8bace7c72308e71aa0c4b02351e938..e8fbb6664372660b94e88b0179d1dff6b034265c 100644 (file)
@@ -192,8 +192,6 @@ SoloControl::get_value () const
                return get_masters_value_locked () ? 1.0 : 0.0;
        }
 
-       std::cerr << "solo control @ " << this << " list = " << _list << " as AL " << boost::dynamic_pointer_cast<AutomationList>(_list) << std::endl;
-
        if (_list && boost::dynamic_pointer_cast<AutomationList>(_list)->automation_playback()) {
                // Playing back automation, get the value from the list
                return AutomationControl::get_value();