summaryrefslogtreecommitdiff
path: root/libs/ardour/automation_watch.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2017-01-23 13:25:24 +0100
committerPaul Davis <paul@linuxaudiosystems.com>2017-01-23 13:25:24 +0100
commit93192705bddab9392544d44278d63e4b83c68af2 (patch)
treeb16931d045deeaf2e5ba040f80adc74bf30803f2 /libs/ardour/automation_watch.cc
parent4333a80cb2c90850f77c3c5a2d1ff4cafa7fd5ba (diff)
at transport stop, clear all existing automation watches (touch)
Diffstat (limited to 'libs/ardour/automation_watch.cc')
-rw-r--r--libs/ardour/automation_watch.cc24
1 files changed, 24 insertions, 0 deletions
diff --git a/libs/ardour/automation_watch.cc b/libs/ardour/automation_watch.cc
index 4152c5d5b7..954b65120b 100644
--- a/libs/ardour/automation_watch.cc
+++ b/libs/ardour/automation_watch.cc
@@ -111,6 +111,30 @@ AutomationWatch::remove_automation_watch (boost::shared_ptr<AutomationControl> a
ac->list()->set_in_write_pass (false);
}
+void
+AutomationWatch::transport_stop_automation_watches (framepos_t when)
+{
+ DEBUG_TRACE (DEBUG::Automation, "clear all automation watches\n");
+
+ AutomationWatches tmp;
+
+ {
+ Glib::Threads::Mutex::Lock lm (automation_watch_lock);
+ /* copy automation watches */
+ tmp = automation_watches;
+ /* clear existing container so that each
+ ::remove_automation_watch() call from
+ AutomationControl::stop_touch() is faster.
+ */
+
+ automation_watches.clear ();
+ }
+
+ for (AutomationWatches::iterator i = tmp.begin(); i != tmp.end(); ++i) {
+ (*i)->stop_touch (true, when);
+ }
+}
+
gint
AutomationWatch::timer ()
{