summaryrefslogtreecommitdiff
path: root/libs
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2010-05-03 22:07:47 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2010-05-03 22:07:47 +0000
commitdda06229570980a61de8a9395c1539958cc30b0f (patch)
tree6339b9214121750de658d26729b022d5295e517f /libs
parente33d4553b2b333c30835b00741fc5c1fd0e2b36d (diff)
the great solo model simplification (without much code removal)
git-svn-id: svn://localhost/ardour2/branches/3.0@7049 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs')
-rw-r--r--libs/ardour/delivery.cc2
-rw-r--r--libs/ardour/mute_master.cc8
-rw-r--r--libs/ardour/route.cc7
-rw-r--r--libs/ardour/session.cc26
4 files changed, 31 insertions, 12 deletions
diff --git a/libs/ardour/delivery.cc b/libs/ardour/delivery.cc
index a1aa968a04..5861e5ea2c 100644
--- a/libs/ardour/delivery.cc
+++ b/libs/ardour/delivery.cc
@@ -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()) {
diff --git a/libs/ardour/mute_master.cc b/libs/ardour/mute_master.cc
index 5e49a11875..b06a64e72f 100644
--- a/libs/ardour/mute_master.cc
+++ b/libs/ardour/mute_master.cc
@@ -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()) {
diff --git a/libs/ardour/route.cc b/libs/ardour/route.cc
index 33af0f8abf..243d240b75 100644
--- a/libs/ardour/route.cc
+++ b/libs/ardour/route.cc
@@ -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);
}
}
diff --git a/libs/ardour/session.cc b/libs/ardour/session.cc
index 2da383b810..a643ee21c3 100644
--- a/libs/ardour/session.cc
+++ b/libs/ardour/session.cc
@@ -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();
}