#include "ardour/track.h"
#include "ardour/vca_manager.h"
-#include "i18n.h"
+#include "pbd/i18n.h"
using namespace std;
using namespace PBD;
void
Session::set_controls (boost::shared_ptr<ControlList> cl, double val, Controllable::GroupControlDisposition gcd)
{
- std::cerr << "Session::set_controls called on " << cl->size() << " controls, group = " << enum_2_string (gcd) << std::endl;
+ if (cl->empty()) {
+ return;
+ }
for (ControlList::iterator ci = cl->begin(); ci != cl->end(); ++ci) {
/* as of july 2017 this is a no-op for everything except record enable */
- (*ci)->do_pre_realtime_queue_stuff (val);
+ (*ci)->pre_realtime_queue_stuff (val, gcd);
}
queue_event (get_rt_event (cl, val, gcd));
void
Session::set_control (boost::shared_ptr<AutomationControl> ac, double val, Controllable::GroupControlDisposition gcd)
{
+ if (!ac) {
+ return;
+ }
+
boost::shared_ptr<ControlList> cl (new ControlList);
cl->push_back (ac);
set_controls (cl, val, gcd);
void
Session::rt_set_controls (boost::shared_ptr<ControlList> 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
_vca_manager->clear_all_solo_state ();
- set_dirty();
+ update_route_solo_state ();
}
void