X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=libs%2Fardour%2Fautomation_watch.cc;h=4e5f64bd32cff5336e42534720250260f7755ecb;hb=453ed61c4a23551c7ffeee5d972b29d6d92c1591;hp=7f67bb2c03860311bab6640a759961e129f9e717;hpb=bb9ab696b1f295f90b9faed0886287a2035ccc3e;p=ardour.git diff --git a/libs/ardour/automation_watch.cc b/libs/ardour/automation_watch.cc index 7f67bb2c03..4e5f64bd32 100644 --- a/libs/ardour/automation_watch.cc +++ b/libs/ardour/automation_watch.cc @@ -19,6 +19,8 @@ #include +#include + #include "pbd/compose.h" #include "ardour/automation_control.h" @@ -72,8 +74,10 @@ AutomationWatch::add_automation_watch (boost::shared_ptr ac) */ if (_session && _session->transport_rolling() && ac->alist()->automation_write()) { - DEBUG_TRACE (DEBUG::Automation, string_compose ("\ttransport is rolling @ %1, so enter write pass\n", _session->transport_speed())); - ac->list()->set_in_write_pass (true); + DEBUG_TRACE (DEBUG::Automation, string_compose ("\ttransport is rolling @ %1, audible = %2so enter write pass\n", + _session->transport_speed(), _session->audible_frame())); + /* add a guard point since we are already moving */ + ac->list()->set_in_write_pass (true, true, _session->audible_frame()); } /* we can't store shared_ptr in connections because it @@ -132,7 +136,7 @@ void AutomationWatch::thread () { while (_run_thread) { - usleep (100000); // Config->get_automation_interval() * 10); + Glib::usleep ((useconds_t) floor (Config->get_automation_interval_msecs() * 1000)); timer (); } }