better handling of the inverse-push of solo-by-upstream. still not quite right, but closer

git-svn-id: svn://localhost/ardour2/branches/3.0@7054 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Paul Davis
2010-05-05 01:43:25 +00:00
parent 6d9f600560
commit 8f59346592
2 changed files with 29 additions and 2 deletions

View File

@@ -606,6 +606,10 @@ Route::mod_solo_by_others_upstream (int32_t delta)
return;
}
uint32_t old_sbu = _soloed_by_others_upstream;
cerr << name() << " SbU was " << old_sbu << " delta " << delta << " = ";
if (delta < 0) {
if (_soloed_by_others_upstream >= (uint32_t) abs (delta)) {
_soloed_by_others_upstream += delta;
@@ -616,6 +620,8 @@ Route::mod_solo_by_others_upstream (int32_t delta)
_soloed_by_others_upstream += delta;
}
cerr << _soloed_by_others_upstream << endl;
/* push the inverse solo change to everything that feeds us.
This is important for solo-within-group. When we solo 1 track out of N that
@@ -629,7 +635,22 @@ Route::mod_solo_by_others_upstream (int32_t delta)
not in reverse.
*/
if (Config->get_solo_latched() || delta > 0) {
cerr << name() << " SbU ... latched solo? " << Config->get_solo_latched() << " delta = " << delta << endl;
bool push_inverse = false;
if (old_sbu > 0 && _soloed_by_others_upstream == 0 && _self_solo) {
/* we went back to non-soloed-by-others-upstream but we're still soloed push */
push_inverse = true;
}
if (old_sbu == 0 && _soloed_by_others_upstream > 0) {
/* upstream made us solo when we weren't before */
push_inverse = true;
}
if (push_inverse) {
cerr << "\t ... INVERT push\n";
for (FedBy::iterator i = _fed_by.begin(); i != _fed_by.end(); ++i) {
boost::shared_ptr<Route> sr = i->r.lock();
if (sr) {
@@ -649,6 +670,8 @@ Route::mod_solo_by_others_downstream (int32_t delta)
return;
}
cerr << name() << " SbD delta " << delta << " = ";
if (delta < 0) {
if (_soloed_by_others_downstream >= (uint32_t) abs (delta)) {
_soloed_by_others_downstream += delta;
@@ -659,6 +682,8 @@ Route::mod_solo_by_others_downstream (int32_t delta)
_soloed_by_others_downstream += delta;
}
cerr << _soloed_by_others_downstream << endl;
set_mute_master_solo ();
solo_changed (false, this);
}

View File

@@ -2287,7 +2287,9 @@ Session::route_solo_changed (bool self_solo_change, void* /*src*/, boost::weak_p
if ((*i)->feeds (route, &via_sends_only)) {
if (!via_sends_only) {
(*i)->mod_solo_by_others_downstream (delta);
if (!route->soloed_by_others_upstream()) {
(*i)->mod_solo_by_others_downstream (delta);
}
in_signal_flow = true;
}
}