diff options
author | Robin Gareus <robin@gareus.org> | 2017-07-25 16:09:47 +0200 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2017-09-18 11:40:52 -0400 |
commit | 1d587592ca1472e38b2f8127b87b6202874f0d4e (patch) | |
tree | a3e282d5a21e0d23b0fc58541547160082343e21 /libs/ardour/automation_control.cc | |
parent | 1545c426d9e3bc0411f3b5532c0c5a9eb09394c8 (diff) |
Add support for Latch Automation
Diffstat (limited to 'libs/ardour/automation_control.cc')
-rw-r--r-- | libs/ardour/automation_control.cc | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/libs/ardour/automation_control.cc b/libs/ardour/automation_control.cc index 7deeac4221..02bcbf4f65 100644 --- a/libs/ardour/automation_control.cc +++ b/libs/ardour/automation_control.cc @@ -253,7 +253,7 @@ AutomationControl::set_automation_state (AutoState as) if (as == Write) { AutomationWatch::instance().add_automation_watch (shared_from_this()); - } else if (as == Touch) { + } else if (as & (Touch | Latch)) { if (alist()->empty()) { Control::set_double (val, _session.current_start_frame (), true); Control::set_double (val, _session.current_end_frame (), true); @@ -283,7 +283,7 @@ AutomationControl::start_touch (double when) return; } - if (alist()->automation_state() == Touch) { + if (alist()->automation_state() & (Touch | Latch)) { /* subtle. aligns the user value with the playback and * use take actual value (incl masters). * @@ -306,9 +306,13 @@ AutomationControl::stop_touch (double when) return; } + if (alist()->automation_state() == Latch && _session.transport_rolling ()) { + return; + } + set_touching (false); - if (alist()->automation_state() == Touch) { + if (alist()->automation_state() & (Touch | Latch)) { alist()->stop_touch (when); if (!_desc.toggled) { AutomationWatch::instance().remove_automation_watch (shared_from_this()); |