summaryrefslogtreecommitdiff
path: root/libs/ardour/route.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2016-03-09 13:11:53 -0500
committerPaul Davis <paul@linuxaudiosystems.com>2016-05-31 15:30:40 -0400
commit1c0c9b40b73180537da7630b6a219baf85886da6 (patch)
treed9aa061e6fbfaa560c4c3640f4727568427f2502 /libs/ardour/route.cc
parent8eb45c518dd61594ca059c3751ca9de0f71ecb15 (diff)
new API for route solo/mute state mgmt
Route now calls back into Session when solo/mute/listen state changes. All other interested parties must use the Route::{solo,mute,...}_control()->Changed() to be notified of changes. The Session requires more information than the Changed signal can provide, in order to propagate solo/mute changes across the entire Session correctly. Note that this uses an experimental use of CRTP to isolate a public API within Session
Diffstat (limited to 'libs/ardour/route.cc')
-rw-r--r--libs/ardour/route.cc27
1 files changed, 15 insertions, 12 deletions
diff --git a/libs/ardour/route.cc b/libs/ardour/route.cc
index 94111e602e..569f00fbc7 100644
--- a/libs/ardour/route.cc
+++ b/libs/ardour/route.cc
@@ -830,7 +830,8 @@ Route::set_listen (bool yn, Controllable::GroupControlDisposition group_override
}
_mute_master->set_soloed_by_others (false);
- listen_changed (group_override); /* EMIT SIGNAL */
+ _session.listen_changed (group_override, shared_from_this());
+ _solo_control->Changed(); /* EMIT SIGNAL */
}
}
}
@@ -850,7 +851,6 @@ Route::set_solo_safe (bool yn, Controllable::GroupControlDisposition /* group_ov
{
if (_solo_safe != yn) {
_solo_safe = yn;
- solo_safe_changed (); /* EMIT SIGNAL */
_solo_safe_control->Changed(); /* EMIT SIGNAL */
}
}
@@ -893,7 +893,8 @@ Route::clear_all_solo_state ()
if (emit_changed) {
set_mute_master_solo ();
- solo_changed (false, Controllable::UseGroup); /* EMIT SIGNAL */
+ _session.solo_changed (false, Controllable::UseGroup, shared_from_this());
+ _solo_control->Changed (); /* EMIT SIGNAL */
}
}
@@ -920,7 +921,7 @@ Route::set_solo (bool yn, Controllable::GroupControlDisposition group_override)
if (self_soloed() != yn) {
set_self_solo (yn);
- solo_changed (true, group_override); /* EMIT SIGNAL */
+ _session.solo_changed (true, group_override, shared_from_this());
_solo_control->Changed (); /* EMIT SIGNAL */
}
@@ -998,7 +999,8 @@ Route::mod_solo_by_others_upstream (int32_t delta)
}
set_mute_master_solo ();
- solo_changed (false, Controllable::UseGroup); /* EMIT SIGNAL */
+ _session.solo_changed (false, Controllable::UseGroup, shared_from_this());
+ _solo_control->Changed (); /* EMIT SIGNAL */
}
void
@@ -1020,7 +1022,8 @@ Route::mod_solo_by_others_downstream (int32_t delta)
DEBUG_TRACE (DEBUG::Solo, string_compose ("%1 SbD delta %2 = %3\n", name(), delta, _soloed_by_others_downstream));
set_mute_master_solo ();
- solo_changed (false, Controllable::UseGroup); /* EMIT SIGNAL */
+ _session.solo_changed (false, Controllable::UseGroup, shared_from_this());
+ _solo_control->Changed (); /* EMIT SIGNAL */
}
void
@@ -1050,7 +1053,8 @@ Route::mod_solo_isolated_by_upstream (bool yn)
if (solo_isolated() != old) {
/* solo isolated status changed */
_mute_master->set_solo_ignore (solo_isolated());
- solo_isolated_changed (); /* EMIT SIGNAL */
+ _session.solo_isolated_changed (shared_from_this());
+ _solo_isolate_control->Changed(); /* EMIT SIGNAL */
}
}
@@ -1106,7 +1110,7 @@ Route::set_solo_isolated (bool yn, Controllable::GroupControlDisposition group_o
/* XXX should we back-propagate as well? (April 2010: myself and chris goddard think not) */
- solo_isolated_changed (); /* EMIT SIGNAL */
+ _session.solo_isolated_changed (shared_from_this());
_solo_isolate_control->Changed(); /* EMIT SIGNAL */
}
@@ -1123,7 +1127,7 @@ Route::set_mute_points (MuteMaster::MutePoint mp)
mute_points_changed (); /* EMIT SIGNAL */
if (_mute_master->muted_by_self()) {
- mute_changed (); /* EMIT SIGNAL */
+ _session.mute_changed ();
_mute_control->Changed (); /* EMIT SIGNAL */
}
}
@@ -1143,7 +1147,7 @@ Route::set_mute (bool yn, Controllable::GroupControlDisposition group_override)
*/
act_on_mute ();
/* tell everyone else */
- mute_changed (); /* EMIT SIGNAL */
+ _session.mute_changed ();
_mute_control->Changed (); /* EMIT SIGNAL */
}
}
@@ -4643,7 +4647,6 @@ Route::set_phase_invert (uint32_t c, bool yn)
{
if (_phase_invert[c] != yn) {
_phase_invert[c] = yn;
- phase_invert_changed (); /* EMIT SIGNAL */
_phase_control->Changed(); /* EMIT SIGNAL */
_session.set_dirty ();
}
@@ -4654,7 +4657,7 @@ Route::set_phase_invert (boost::dynamic_bitset<> p)
{
if (_phase_invert != p) {
_phase_invert = p;
- phase_invert_changed (); /* EMIT SIGNAL */
+ _phase_control->Changed (); /* EMIT SIGNAL */
_session.set_dirty ();
}
}