allow to query export profile type
[ardour.git] / libs / ardour / session_rtevents.cc
index 3c905299b8732bb097e6c7677c3f50ba868ecf39..5572cdce708bbe5b9643b7458e472a843357d415 100644 (file)
@@ -27,7 +27,7 @@
 #include "ardour/track.h"
 #include "ardour/vca_manager.h"
 
-#include "i18n.h"
+#include "pbd/i18n.h"
 
 using namespace std;
 using namespace PBD;
@@ -37,13 +37,27 @@ using namespace Glib;
 void
 Session::set_controls (boost::shared_ptr<ControlList> cl, double val, Controllable::GroupControlDisposition gcd)
 {
+       if (cl->empty()) {
+               return;
+       }
+
        std::cerr << "Session::set_controls called on " << cl->size() << " controls, group = " << enum_2_string (gcd) << std::endl;
+
+       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);
+       }
+
        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);