make "exclusive solo" apply to listen as well as SiP

git-svn-id: svn://localhost/ardour2/branches/3.0@7064 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Paul Davis
2010-05-05 15:47:51 +00:00
parent 25704da321
commit 3fa522e5df
3 changed files with 32 additions and 6 deletions

View File

@@ -536,11 +536,14 @@ Route::set_listen (bool yn, void* src)
}
if (_monitor_send) {
cerr << name() << " set listen = " << yn << " current = " << _monitor_send->active() << endl;
if (yn != _monitor_send->active()) {
if (yn) {
_monitor_send->activate ();
} else {
_mute_master->set_soloed (true);
} else {
_monitor_send->deactivate ();
_mute_master->set_soloed (false);
}
listen_changed (src); /* EMIT SIGNAL */

View File

@@ -2225,8 +2225,22 @@ Session::route_listen_changed (void* /*src*/, boost::weak_ptr<Route> wpr)
}
if (route->listening()) {
if (Config->get_exclusive_solo()) {
/* new listen: disable all other listen */
shared_ptr<RouteList> r = routes.reader ();
for (RouteList::iterator i = r->begin(); i != r->end(); ++i) {
if ((*i) == route || (*i)->solo_isolated() || (*i)->is_master() || (*i)->is_monitor() || (*i)->is_hidden()) {
continue;
}
(*i)->set_listen (false, this);
}
}
_listen_cnt++;
} else if (_listen_cnt > 0) {
_listen_cnt--;
}
}