summaryrefslogtreecommitdiff
path: root/libs
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2015-07-13 15:26:59 -0400
committerPaul Davis <paul@linuxaudiosystems.com>2015-07-16 10:11:04 -0400
commit8a686632a041ba17212ad66c33e5cbd9d77b3e38 (patch)
tree50e25f42895e72c2116e8ff0a8d1b8136bbfe45f /libs
parent782aa6aa47e161c5fa72f49fef5e3ab85592b197 (diff)
separate solo isolate into two components (self-solo-isolate and solo-isolated-by-upstream)
Diffstat (limited to 'libs')
-rw-r--r--libs/ardour/ardour/route.h3
-rw-r--r--libs/ardour/route.cc70
2 files changed, 51 insertions, 22 deletions
diff --git a/libs/ardour/ardour/route.h b/libs/ardour/ardour/route.h
index cce1e152a2..ec6fa8ca8d 100644
--- a/libs/ardour/ardour/route.h
+++ b/libs/ardour/ardour/route.h
@@ -547,7 +547,10 @@ class LIBARDOUR_API Route : public SessionObject, public Automatable, public Rou
uint32_t _soloed_by_others_upstream;
uint32_t _soloed_by_others_downstream;
uint32_t _solo_isolated;
+ uint32_t _solo_isolated_by_upstream;
+ void mod_solo_isolated_by_upstream (bool, void*);
+
bool _denormal_protection;
bool _recordable : 1;
diff --git a/libs/ardour/route.cc b/libs/ardour/route.cc
index 432473657c..34d92b7a7e 100644
--- a/libs/ardour/route.cc
+++ b/libs/ardour/route.cc
@@ -97,6 +97,7 @@ Route::Route (Session& sess, string name, Flag flg, DataType default_type)
, _soloed_by_others_upstream (0)
, _soloed_by_others_downstream (0)
, _solo_isolated (0)
+ , _solo_isolated_by_upstream (0)
, _denormal_protection (false)
, _recordable (true)
, _silent (false)
@@ -952,6 +953,28 @@ Route::set_mute_master_solo ()
}
void
+Route::mod_solo_isolated_by_upstream (bool yn, void* src)
+{
+ bool old = solo_isolated ();
+
+ if (!yn) {
+ if (_solo_isolated_by_upstream >= 1) {
+ _solo_isolated_by_upstream--;
+ } else {
+ _solo_isolated_by_upstream = 0;
+ }
+ } else {
+ _solo_isolated_by_upstream++;
+ }
+
+ if (solo_isolated() != old) {
+ /* solo isolated status changed */
+ _mute_master->set_solo_ignore (yn);
+ solo_isolated_changed (src);
+ }
+}
+
+void
Route::set_solo_isolated (bool yn, void *src)
{
if (is_master() || is_monitor() || is_auditioner()) {
@@ -963,25 +986,6 @@ Route::set_solo_isolated (bool yn, void *src)
return;
}
- /* forward propagate solo-isolate status to everything fed by this route, but not those via sends only */
-
- boost::shared_ptr<RouteList> routes = _session.get_routes ();
- for (RouteList::iterator i = routes->begin(); i != routes->end(); ++i) {
-
- if ((*i).get() == this || (*i)->is_master() || (*i)->is_monitor() || (*i)->is_auditioner()) {
- continue;
- }
-
- bool sends_only;
- bool does_feed = direct_feeds_according_to_graph (*i, &sends_only); // we will recurse anyway, so don't use ::feeds()
-
- if (does_feed && !sends_only) {
- (*i)->set_solo_isolated (yn, (*i)->route_group());
- }
- }
-
- /* XXX should we back-propagate as well? (April 2010: myself and chris goddard think not) */
-
bool changed = false;
if (yn) {
@@ -1000,15 +1004,37 @@ Route::set_solo_isolated (bool yn, void *src)
}
}
- if (changed) {
- solo_isolated_changed (src);
+
+ if (!changed) {
+ return;
}
+
+ /* forward propagate solo-isolate status to everything fed by this route, but not those via sends only */
+
+ boost::shared_ptr<RouteList> routes = _session.get_routes ();
+ for (RouteList::iterator i = routes->begin(); i != routes->end(); ++i) {
+
+ if ((*i).get() == this || (*i)->is_master() || (*i)->is_monitor() || (*i)->is_auditioner()) {
+ continue;
+ }
+
+ bool sends_only;
+ bool does_feed = feeds (*i, &sends_only);
+
+ if (does_feed && !sends_only) {
+ (*i)->mod_solo_isolated_by_upstream (yn, src);
+ }
+ }
+
+ /* XXX should we back-propagate as well? (April 2010: myself and chris goddard think not) */
+
+ solo_isolated_changed (src);
}
bool
Route::solo_isolated () const
{
- return _solo_isolated > 0;
+ return (_solo_isolated > 0) || (_solo_isolated_by_upstream > 0);
}
void