mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-10 08:36:32 +01:00
Session API changes to enable VCAs to set soloed-by-upstream on assigned routes
This commit is contained in:
parent
9a0f4b1ef3
commit
a3c5b81ca1
3 changed files with 44 additions and 1 deletions
|
|
@ -792,6 +792,7 @@ class LIBARDOUR_API Session : public PBD::StatefulDestructible, public PBD::Scop
|
||||||
static const SessionEvent::RTeventCallback rt_cleanup;
|
static const SessionEvent::RTeventCallback rt_cleanup;
|
||||||
|
|
||||||
void set_solo (boost::shared_ptr<RouteList>, bool, SessionEvent::RTeventCallback after = rt_cleanup, PBD::Controllable::GroupControlDisposition group_override = PBD::Controllable::UseGroup);
|
void set_solo (boost::shared_ptr<RouteList>, bool, SessionEvent::RTeventCallback after = rt_cleanup, PBD::Controllable::GroupControlDisposition group_override = PBD::Controllable::UseGroup);
|
||||||
|
void set_implicit_solo (boost::shared_ptr<RouteList>, int delta, bool up_or_downstream, SessionEvent::RTeventCallback after = rt_cleanup, PBD::Controllable::GroupControlDisposition group_override = PBD::Controllable::UseGroup);
|
||||||
void clear_all_solo_state (boost::shared_ptr<RouteList>);
|
void clear_all_solo_state (boost::shared_ptr<RouteList>);
|
||||||
void set_just_one_solo (boost::shared_ptr<Route>, bool, SessionEvent::RTeventCallback after = rt_cleanup);
|
void set_just_one_solo (boost::shared_ptr<Route>, bool, SessionEvent::RTeventCallback after = rt_cleanup);
|
||||||
void set_mute (boost::shared_ptr<RouteList>, bool, SessionEvent::RTeventCallback after = rt_cleanup, PBD::Controllable::GroupControlDisposition group_override = PBD::Controllable::UseGroup);
|
void set_mute (boost::shared_ptr<RouteList>, bool, SessionEvent::RTeventCallback after = rt_cleanup, PBD::Controllable::GroupControlDisposition group_override = PBD::Controllable::UseGroup);
|
||||||
|
|
@ -1922,7 +1923,20 @@ class LIBARDOUR_API Session : public PBD::StatefulDestructible, public PBD::Scop
|
||||||
return ev;
|
return ev;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* specialized version realtime "apply to set of routes" operations */
|
||||||
|
template<typename T1, typename T2> SessionEvent*
|
||||||
|
get_rt_event (boost::shared_ptr<RouteList> rl, T1 t1arg, T2 t2arg, SessionEvent::RTeventCallback after, PBD::Controllable::GroupControlDisposition group_override,
|
||||||
|
void (Session::*method) (boost::shared_ptr<RouteList>, T1, T2, PBD::Controllable::GroupControlDisposition)) {
|
||||||
|
SessionEvent* ev = new SessionEvent (SessionEvent::RealTimeOperation, SessionEvent::Add, SessionEvent::Immediate, 0, 0.0);
|
||||||
|
ev->rt_slot = boost::bind (method, this, rl, t1arg, t2arg, group_override);
|
||||||
|
ev->rt_return = after;
|
||||||
|
ev->event_loop = PBD::EventLoop::get_event_loop_for_thread ();
|
||||||
|
|
||||||
|
return ev;
|
||||||
|
}
|
||||||
|
|
||||||
void rt_set_solo (boost::shared_ptr<RouteList>, bool yn, PBD::Controllable::GroupControlDisposition group_override);
|
void rt_set_solo (boost::shared_ptr<RouteList>, bool yn, PBD::Controllable::GroupControlDisposition group_override);
|
||||||
|
void rt_set_implicit_solo (boost::shared_ptr<RouteList>, int delta, bool up_or_downstream, PBD::Controllable::GroupControlDisposition);
|
||||||
void rt_clear_all_solo_state (boost::shared_ptr<RouteList>, bool yn, PBD::Controllable::GroupControlDisposition group_override);
|
void rt_clear_all_solo_state (boost::shared_ptr<RouteList>, bool yn, PBD::Controllable::GroupControlDisposition group_override);
|
||||||
void rt_set_just_one_solo (boost::shared_ptr<RouteList>, bool yn, PBD::Controllable::GroupControlDisposition /* ignored*/ );
|
void rt_set_just_one_solo (boost::shared_ptr<RouteList>, bool yn, PBD::Controllable::GroupControlDisposition /* ignored*/ );
|
||||||
void rt_set_mute (boost::shared_ptr<RouteList>, bool yn, PBD::Controllable::GroupControlDisposition group_override);
|
void rt_set_mute (boost::shared_ptr<RouteList>, bool yn, PBD::Controllable::GroupControlDisposition group_override);
|
||||||
|
|
|
||||||
|
|
@ -90,6 +90,35 @@ Session::rt_set_solo (boost::shared_ptr<RouteList> rl, bool yn, Controllable::Gr
|
||||||
}
|
}
|
||||||
|
|
||||||
set_dirty();
|
set_dirty();
|
||||||
|
|
||||||
|
/* XXX boost::shared_ptr<RouteList> 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<RouteList> 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<RouteList> 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<RouteList> goes out of scope here and is likley free()ed in RT context
|
/* XXX boost::shared_ptr<RouteList> 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.
|
* because boost's shared_ptr does reference counting and free/delete in the dtor.
|
||||||
* (this also applies to other rt_ methods here)
|
* (this also applies to other rt_ methods here)
|
||||||
|
|
|
||||||
|
|
@ -180,7 +180,7 @@ VCA::set_solo (bool yn)
|
||||||
if (Config->get_solo_control_is_listen_control()) {
|
if (Config->get_solo_control_is_listen_control()) {
|
||||||
_session.set_listen (rl, yn, Session::rt_cleanup, Controllable::NoGroup);
|
_session.set_listen (rl, yn, Session::rt_cleanup, Controllable::NoGroup);
|
||||||
} else {
|
} else {
|
||||||
_session.set_solo (rl, yn, Session::rt_cleanup, Controllable::NoGroup);
|
_session.set_implicit_solo (rl, (yn ? 1 : -1), true, Session::rt_cleanup, Controllable::NoGroup);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue