From a3c5b81ca13f81cd4db628096943f049bc6c0af1 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Tue, 8 Mar 2016 10:42:20 -0500 Subject: Session API changes to enable VCAs to set soloed-by-upstream on assigned routes --- libs/ardour/session_rtevents.cc | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) (limited to 'libs/ardour/session_rtevents.cc') diff --git a/libs/ardour/session_rtevents.cc b/libs/ardour/session_rtevents.cc index 5850643739..68ba15550e 100644 --- a/libs/ardour/session_rtevents.cc +++ b/libs/ardour/session_rtevents.cc @@ -90,6 +90,35 @@ Session::rt_set_solo (boost::shared_ptr rl, bool yn, Controllable::Gr } set_dirty(); + + /* XXX boost::shared_ptr goes out of scope here and is likley free()ed in RT context + * because boost's shared_ptr does reference counting and free/delete in the dtor. + * (this also applies to other rt_ methods here) + */ +} + +void +Session::set_implicit_solo (boost::shared_ptr rl, int delta, bool upstream, SessionEvent::RTeventCallback after, + Controllable::GroupControlDisposition group_override) +{ + queue_event (get_rt_event (rl, delta, upstream, after, group_override, &Session::rt_set_implicit_solo)); +} + +void +Session::rt_set_implicit_solo (boost::shared_ptr rl, int delta, bool upstream, PBD::Controllable::GroupControlDisposition) +{ + for (RouteList::iterator i = rl->begin(); i != rl->end(); ++i) { + if (!(*i)->is_auditioner()) { + if (upstream) { + (*i)->mod_solo_by_others_upstream (delta); + } else { + (*i)->mod_solo_by_others_downstream (delta); + } + } + } + + set_dirty(); + /* XXX boost::shared_ptr goes out of scope here and is likley free()ed in RT context * because boost's shared_ptr does reference counting and free/delete in the dtor. * (this also applies to other rt_ methods here) -- cgit v1.2.3