summaryrefslogtreecommitdiff
path: root/libs
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2009-12-10 18:34:31 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2009-12-10 18:34:31 +0000
commit4341e678944d26870d89498b858609b07e480555 (patch)
treed7763ab4212b492610750863ecda5eeb97986b23 /libs
parente25862d787b72cb39cb555a15d78e9ba1fa4ea67 (diff)
forward propagate solo-isolated status to everything fed by a route by something other than a send
git-svn-id: svn://localhost/ardour2/branches/3.0@6340 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs')
-rw-r--r--libs/ardour/ardour/route.h2
-rw-r--r--libs/ardour/route.cc41
2 files changed, 38 insertions, 5 deletions
diff --git a/libs/ardour/ardour/route.h b/libs/ardour/ardour/route.h
index 8e63a2d523..44073a07a7 100644
--- a/libs/ardour/ardour/route.h
+++ b/libs/ardour/ardour/route.h
@@ -353,7 +353,7 @@ class Route : public SessionObject, public AutomatableControls, public RouteGrou
uint32_t _phase_invert;
bool _self_solo;
uint32_t _soloed_by_others;
- bool _solo_isolated;
+ uint32_t _solo_isolated;
bool _denormal_protection;
diff --git a/libs/ardour/route.cc b/libs/ardour/route.cc
index f04de4c242..3bc7591251 100644
--- a/libs/ardour/route.cc
+++ b/libs/ardour/route.cc
@@ -118,7 +118,7 @@ Route::init ()
{
_self_solo = false;
_soloed_by_others = 0;
- _solo_isolated = false;
+ _solo_isolated = 0;
_solo_safe = false;
_active = true;
processor_max_streams.reset();
@@ -608,13 +608,46 @@ Route::set_delivery_solo ()
void
Route::set_solo_isolated (bool yn, void *src)
{
+ if (is_master() || is_control() || is_hidden()) {
+ return;
+ }
+
if (_route_group && src != _route_group && _route_group->active_property (RouteGroup::Solo)) {
_route_group->apply (&Route::set_solo_isolated, yn, _route_group);
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) {
+ bool sends_only;
+ bool does_feed = feeds (*i, &sends_only);
+
+ if (does_feed && !sends_only) {
+ (*i)->set_solo_isolated (yn, (*i)->route_group());
+ }
+ }
+
+ bool changed = false;
+
+ cerr << _name << " Solo isolated was " << _solo_isolated << endl;
+
+ if (yn) {
+ if (_solo_isolated == 0) {
+ changed = true;
+ }
+ _solo_isolated++;
+ } else {
+ changed = (_solo_isolated == 1);
+ if (_solo_isolated > 0) {
+ _solo_isolated--;
+ }
+ }
+
+ cerr << "\tnow " << _solo_isolated << endl;
- if (yn != _solo_isolated) {
- _solo_isolated = yn;
+ if (changed) {
set_delivery_solo ();
solo_isolated_changed (src);
}
@@ -623,7 +656,7 @@ Route::set_solo_isolated (bool yn, void *src)
bool
Route::solo_isolated () const
{
- return _solo_isolated;
+ return _solo_isolated > 0;
}
void