X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=libs%2Fardour%2Fautomation_watch.cc;h=5fa7285c674f11b585ac6beecf24259df72e9217;hb=aa0effb4cb38f4c3a06564bd9e6a0ee516d4f958;hp=0fa98f2133a5469ac30e170b919a7353e7584015;hpb=8b3d0f04c13493e6026f4609a4f8138273e01c62;p=ardour.git diff --git a/libs/ardour/automation_watch.cc b/libs/ardour/automation_watch.cc index 0fa98f2133..5fa7285c67 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 @@ -120,7 +124,7 @@ AutomationWatch::timer () for (AutomationWatches::iterator aw = automation_watches.begin(); aw != automation_watches.end(); ++aw) { if ((*aw)->alist()->automation_write()) { - (*aw)->list()->add (time, (*aw)->user_double()); + (*aw)->list()->add (time, (*aw)->user_double(), true); } } } @@ -132,7 +136,7 @@ void AutomationWatch::thread () { while (_run_thread) { - usleep ((useconds_t) floor (Config->get_automation_interval_msecs() * 1000)); + Glib::usleep ((gulong) floor (Config->get_automation_interval_msecs() * 1000)); timer (); } }