From b2b5c965c854d222f70080de5fcafb10b75ff40b Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Sun, 10 Apr 2016 18:20:11 -0400 Subject: some tweaks for solo logic to get things working as they were before (correctly) --- libs/ardour/session.cc | 29 ++++++++++++++++++----------- libs/ardour/solo_control.cc | 2 -- 2 files changed, 18 insertions(+), 13 deletions(-) (limited to 'libs') diff --git a/libs/ardour/session.cc b/libs/ardour/session.cc index 7658ff270d..7fec4bb931 100644 --- a/libs/ardour/session.cc +++ b/libs/ardour/session.cc @@ -3774,8 +3774,6 @@ Session::route_solo_isolated_changed (boost::weak_ptr wpr) void Session::route_solo_changed (bool self_solo_change, Controllable::GroupControlDisposition group_override, boost::weak_ptr 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 (wpr.lock()); @@ -3964,16 +3962,17 @@ Session::update_route_solo_state (boost::shared_ptr 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 */ diff --git a/libs/ardour/solo_control.cc b/libs/ardour/solo_control.cc index 45ec5b90ec..e8fbb66643 100644 --- a/libs/ardour/solo_control.cc +++ b/libs/ardour/solo_control.cc @@ -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(_list) << std::endl; - if (_list && boost::dynamic_pointer_cast(_list)->automation_playback()) { // Playing back automation, get the value from the list return AutomationControl::get_value(); -- cgit v1.2.3