the great solo model simplification (without much code removal)
git-svn-id: svn://localhost/ardour2/branches/3.0@7049 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
e33d4553b2
commit
dda0622957
@ -838,7 +838,7 @@ RouteUI::mute_visual_state (Session* s, boost::shared_ptr<Route> r)
|
||||
if (r->self_muted ()) {
|
||||
/* full mute */
|
||||
return 2;
|
||||
} else if (!r->self_soloed() && (r->muted_by_others() || r->path_muted_by_others())) {
|
||||
} else if (s->soloing() && !r->soloed() && !r->solo_isolated()) {
|
||||
return 1;
|
||||
} else {
|
||||
/* no mute at all */
|
||||
|
@ -500,7 +500,7 @@ Delivery::target_gain ()
|
||||
break;
|
||||
}
|
||||
|
||||
//cerr << name() << ' ';
|
||||
// cerr << name() << ' ';
|
||||
desired_gain = _mute_master->mute_gain_at (mp);
|
||||
|
||||
if (_role == Listen && _session.monitor_out() && !_session.listening()) {
|
||||
|
@ -99,11 +99,11 @@ MuteMaster::mute_gain_at (MutePoint mp) const
|
||||
// cerr << "solo level = " << _solo_level << " selfmuted " << self_muted_at (mp) << " omute " << muted_by_others_at (mp) << endl;
|
||||
|
||||
if (Config->get_solo_mute_override()) {
|
||||
if ((l == SelfSoloed) || (l == DownstreamSoloed)) {
|
||||
if ((l == SelfSoloed) || (l == UpstreamSoloed)) {
|
||||
gain = 1.0;
|
||||
} else if (self_muted_at (mp)) { // self-muted
|
||||
gain = Config->get_solo_mute_gain ();
|
||||
} else if (l == UpstreamSoloed) {
|
||||
} else if (l == DownstreamSoloed) {
|
||||
gain = 1.0;
|
||||
} else if (muted_by_others_at (mp)) { // muted by others
|
||||
gain = Config->get_solo_mute_gain ();
|
||||
@ -117,11 +117,11 @@ MuteMaster::mute_gain_at (MutePoint mp) const
|
||||
} else {
|
||||
if (self_muted_at (mp)) { // self-muted
|
||||
gain = Config->get_solo_mute_gain ();
|
||||
} else if ((l == SelfSoloed) || (l == DownstreamSoloed)) {
|
||||
} else if ((l == SelfSoloed) || (l == UpstreamSoloed)) {
|
||||
gain = 1.0;
|
||||
} else if (muted_by_others_at (mp)) { // muted by others
|
||||
gain = Config->get_solo_mute_gain ();
|
||||
} else if (l == UpstreamSoloed) { // soloed by others
|
||||
} else if (l == DownstreamSoloed) { // soloed by others
|
||||
gain = 1.0;
|
||||
} else {
|
||||
if (!_solo_ignore && _session.soloing()) {
|
||||
|
@ -692,12 +692,17 @@ Route::set_solo_isolated (bool yn, void *src)
|
||||
/* XXX should we back-propagate as well? (April 2010: myself and chris goddard think not) */
|
||||
|
||||
if (yn) {
|
||||
if (_solo_isolated == 0) {
|
||||
_mute_master->set_solo_ignore (true);
|
||||
}
|
||||
_solo_isolated++;
|
||||
_mute_master->clear_muted_by_others ();
|
||||
solo_isolated_changed (src);
|
||||
} else {
|
||||
if (_solo_isolated > 0) {
|
||||
_solo_isolated--;
|
||||
if (_solo_isolated == 0) {
|
||||
_mute_master->set_solo_ignore (false);
|
||||
}
|
||||
solo_isolated_changed (src);
|
||||
}
|
||||
}
|
||||
|
@ -2276,17 +2276,16 @@ Session::route_solo_changed (bool self_solo_change, void* /*src*/, boost::weak_p
|
||||
*/
|
||||
|
||||
RouteList uninvolved;
|
||||
|
||||
|
||||
for (RouteList::iterator i = r->begin(); i != r->end(); ++i) {
|
||||
bool via_sends_only;
|
||||
bool in_signal_flow;
|
||||
|
||||
if ((*i) == route || (*i)->solo_isolated() || (*i)->is_master() || (*i)->is_monitor() || (*i)->is_hidden()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if ((*i)->graph_level () == route->graph_level()) {
|
||||
(*i)->mod_muted_by_others (delta);
|
||||
}
|
||||
in_signal_flow = false;
|
||||
|
||||
/* feed-backwards (other route to solo change route):
|
||||
|
||||
@ -2299,7 +2298,8 @@ 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_upstream (delta);
|
||||
(*i)->mod_solo_by_others_downstream (delta);
|
||||
in_signal_flow = true;
|
||||
}
|
||||
}
|
||||
|
||||
@ -2312,12 +2312,26 @@ Session::route_solo_changed (bool self_solo_change, void* /*src*/, boost::weak_p
|
||||
*/
|
||||
|
||||
if (route->feeds (*i, &via_sends_only)) {
|
||||
(*i)->mod_solo_by_others_downstream (delta);
|
||||
(*i)->mod_solo_by_others_upstream (delta);
|
||||
in_signal_flow = true;
|
||||
}
|
||||
|
||||
if (!in_signal_flow) {
|
||||
uninvolved.push_back (*i);
|
||||
}
|
||||
}
|
||||
|
||||
solo_update_disabled = false;
|
||||
update_route_solo_state (r);
|
||||
|
||||
/* now notify that the mute state of the routes not involved in the signal
|
||||
pathway of the just-solo-changed route may have altered.
|
||||
*/
|
||||
|
||||
for (RouteList::iterator i = uninvolved.begin(); i != uninvolved.end(); ++i) {
|
||||
(*i)->mute_changed (this);
|
||||
}
|
||||
|
||||
SoloChanged (); /* EMIT SIGNAL */
|
||||
set_dirty();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user