From bb9ab696b1f295f90b9faed0886287a2035ccc3e Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Wed, 14 Nov 2012 15:06:41 +0000 Subject: likely fixes for most remaining issues with data in automation/control lists, but more testing needed git-svn-id: svn://localhost/ardour2/branches/3.0@13497 d708f5d6-7413-0410-9779-e7cbd77b26cf --- libs/ardour/automation_watch.cc | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'libs/ardour/automation_watch.cc') diff --git a/libs/ardour/automation_watch.cc b/libs/ardour/automation_watch.cc index d3138ee336..7f67bb2c03 100644 --- a/libs/ardour/automation_watch.cc +++ b/libs/ardour/automation_watch.cc @@ -28,8 +28,6 @@ using namespace ARDOUR; using namespace PBD; -using std::cerr; -using std::endl; AutomationWatch* AutomationWatch::_instance = 0; @@ -65,8 +63,8 @@ void AutomationWatch::add_automation_watch (boost::shared_ptr ac) { Glib::Threads::Mutex::Lock lm (automation_watch_lock); - DEBUG_TRACE (DEBUG::Automation, string_compose ("now watching control %1 for automation\n", ac->name())); - automation_watches.push_back (ac); + DEBUG_TRACE (DEBUG::Automation, string_compose ("now watching control %1 for automation, astate = %2\n", ac->name(), enum_2_string (ac->automation_state()))); + automation_watches.insert (ac); /* if an automation control is added here while the transport is * rolling, make sure that it knows that there is a write pass going @@ -104,7 +102,7 @@ AutomationWatch::remove_automation_watch (boost::shared_ptr a { Glib::Threads::Mutex::Lock lm (automation_watch_lock); DEBUG_TRACE (DEBUG::Automation, string_compose ("remove control %1 from automation watch\n", ac->name())); - automation_watches.remove (ac); + automation_watches.erase (ac); ac->list()->set_in_write_pass (false); } @@ -117,7 +115,7 @@ AutomationWatch::timer () { Glib::Threads::Mutex::Lock lm (automation_watch_lock); - + framepos_t time = _session->audible_frame (); for (AutomationWatches::iterator aw = automation_watches.begin(); aw != automation_watches.end(); ++aw) { -- cgit v1.2.3