diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2011-01-27 01:31:03 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2011-01-27 01:31:03 +0000 |
commit | 15b5fce90480490455237da917167b0bcb5ce946 (patch) | |
tree | 5c1c5929a83c05db1a901e775fefe4f6cf8dc1b7 /libs/ardour/diskstream.cc | |
parent | 1385643131a2b2231bbbc0c584c76883fcfb580a (diff) |
merge 3.0-panexp (pan experiments) branch, revisions 8534-8585 into 3.0, thus ending 3.0-panexp. THIS COMMIT WILL BREAK ALL EXISTING 3.0 SESSIONS IN SOME WAY (possibly not fatally).
git-svn-id: svn://localhost/ardour2/branches/3.0@8586 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/diskstream.cc')
-rw-r--r-- | libs/ardour/diskstream.cc | 31 |
1 files changed, 19 insertions, 12 deletions
diff --git a/libs/ardour/diskstream.cc b/libs/ardour/diskstream.cc index bf77d7d6ad..df9d1a9b4d 100644 --- a/libs/ardour/diskstream.cc +++ b/libs/ardour/diskstream.cc @@ -46,6 +46,8 @@ #include "ardour/configuration.h" #include "ardour/audiofilesource.h" #include "ardour/send.h" +#include "ardour/pannable.h" +#include "ardour/panner_shell.h" #include "ardour/playlist.h" #include "ardour/cycle_timer.h" #include "ardour/region.h" @@ -458,18 +460,23 @@ Diskstream::playlist_ranges_moved (list< Evoral::RangeMove<framepos_t> > const & } /* move panner automation */ - boost::shared_ptr<Panner> p = _track->main_outs()->panner (); - if (p) { - for (uint32_t i = 0; i < p->npanners (); ++i) { - boost::shared_ptr<AutomationList> pan_alist = p->streampanner(i).pan_control()->alist(); - XMLNode & before = pan_alist->get_state (); - bool const things_moved = pan_alist->move_ranges (movements); - if (things_moved) { - _session.add_command (new MementoCommand<AutomationList> ( - *pan_alist.get(), &before, &pan_alist->get_state ())); - } - } - } + boost::shared_ptr<Pannable> pannable = _track->pannable(); + Evoral::ControlSet::Controls& c (pannable->controls()); + + for (Evoral::ControlSet::Controls::iterator ci = c.begin(); ci != c.end(); ++ci) { + boost::shared_ptr<AutomationControl> ac = boost::dynamic_pointer_cast<AutomationControl>(ci->second); + if (!ac) { + continue; + } + boost::shared_ptr<AutomationList> alist = ac->alist(); + + XMLNode & before = alist->get_state (); + bool const things_moved = alist->move_ranges (movements); + if (things_moved) { + _session.add_command (new MementoCommand<AutomationList> ( + *alist.get(), &before, &alist->get_state ())); + } + } /* move processor automation */ _track->foreach_processor (boost::bind (&Diskstream::move_processor_automation, this, _1, movements_frames)); |