From c5eda4cfe1e7b9ae9abbe2e7b6bd640586a3b9fb Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Fri, 25 Nov 2016 10:29:16 +0000 Subject: provisional changes to speed up solo changes to large numbers of routes. Moves global update of solo state and emission of Session::SoloChanged to a single point after 1 to N solo controls are changed. Also avoid unnecessarily emitted Activated() signal for listen controls, though Process::{activate,deactive}() should probably be redesigned to avoid this in a "deeper" way --- libs/ardour/session_rtevents.cc | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'libs/ardour/session_rtevents.cc') diff --git a/libs/ardour/session_rtevents.cc b/libs/ardour/session_rtevents.cc index 00d966acaa..5f1c7a54cb 100644 --- a/libs/ardour/session_rtevents.cc +++ b/libs/ardour/session_rtevents.cc @@ -64,9 +64,28 @@ Session::set_control (boost::shared_ptr ac, double val, Contr void Session::rt_set_controls (boost::shared_ptr cl, double val, Controllable::GroupControlDisposition gcd) { + /* Note that we require that all controls in the ControlList are of the + same type. + */ + if (cl->empty()) { + return; + } + for (ControlList::iterator c = cl->begin(); c != cl->end(); ++c) { (*c)->set_value (val, gcd); } + + /* some controls need global work to take place after they are set. Do + * that here. + */ + + switch (cl->front()->parameter().type()) { + case SoloAutomation: + update_route_solo_state (); + break; + default: + break; + } } void -- cgit v1.2.3