diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2010-08-19 21:09:40 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2010-08-19 21:09:40 +0000 |
commit | 7b6b75f38ff6b34de3f70e36045498f227c1727d (patch) | |
tree | d7bc76a8745daa5051b2bcce7f84910f3ad72aac /libs/ardour/automatable.cc | |
parent | b6642d14ca64153b5731d1a3a79e4d00060541ca (diff) |
forward port automation handling changes from 2.x, upto and including about rev 6981 (will need full testing in the 3.X context). as on 2.x, this removes real-time visual updates to automation curves during write/touch automation recording
git-svn-id: svn://localhost/ardour2/branches/3.0@7653 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/automatable.cc')
-rw-r--r-- | libs/ardour/automatable.cc | 27 |
1 files changed, 18 insertions, 9 deletions
diff --git a/libs/ardour/automatable.cc b/libs/ardour/automatable.cc index 5ae4e96b4e..68c42ba7b5 100644 --- a/libs/ardour/automatable.cc +++ b/libs/ardour/automatable.cc @@ -27,6 +27,7 @@ #include "pbd/error.h" #include "pbd/enumwriter.h" +#include "pbd/stacktrace.h" #include "midi++/names.h" @@ -393,7 +394,7 @@ Automatable::automation_snapshot (nframes_t now, bool force) for (Controls::iterator i = controls().begin(); i != controls().end(); ++i) { boost::shared_ptr<AutomationControl> c = boost::dynamic_pointer_cast<AutomationControl>(i->second); - if (c->automation_write()) { + if (_a_session.transport_rolling() && c->automation_write()) { c->list()->rt_add (now, i->second->user_double()); } } @@ -403,20 +404,28 @@ Automatable::automation_snapshot (nframes_t now, bool force) } void -Automatable::transport_stopped (sframes_t now) +Automatable::transport_stopped (framepos_t now) { for (Controls::iterator li = controls().begin(); li != controls().end(); ++li) { boost::shared_ptr<AutomationControl> c = boost::dynamic_pointer_cast<AutomationControl>(li->second); - boost::shared_ptr<AutomationList> l + if (c) { + boost::shared_ptr<AutomationList> l = boost::dynamic_pointer_cast<AutomationList>(c->list()); - - c->list()->reposition_for_rt_add (now); - - if (c->automation_state() != Off) { - c->set_value(c->list()->eval(now)); - } + + if (l) { + l->write_pass_finished (now); + + if (l->automation_playback()) { + c->set_value(c->list()->eval(now)); + } + + if (l->automation_state() == Write) { + l->set_automation_state (Touch); + } + } + } } } |