fix typo in c212c16eb
[ardour.git] / libs / ardour / automation_watch.cc
index 7f67bb2c03860311bab6640a759961e129f9e717..16e10c95f941f938340488419fae9f3c88545dc3 100644 (file)
@@ -72,8 +72,10 @@ AutomationWatch::add_automation_watch (boost::shared_ptr<AutomationControl> 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<Destructible> in connections because it
@@ -132,7 +134,7 @@ void
 AutomationWatch::thread ()
 {
        while (_run_thread) {
-               usleep (100000); // Config->get_automation_interval() * 10);
+               usleep ((useconds_t) floor (Config->get_automation_interval_msecs() * 1000));
                timer ();
        }
 }