diff options
Diffstat (limited to 'libs/ardour/session.cc')
-rw-r--r-- | libs/ardour/session.cc | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/libs/ardour/session.cc b/libs/ardour/session.cc index d5579eb6fc..7e107b3056 100644 --- a/libs/ardour/session.cc +++ b/libs/ardour/session.cc @@ -1425,28 +1425,29 @@ Session::auto_loop_changed (Location* location) (*i)->reload_loop (); } + if (rolling) { if (play_loop) { + /* Set this so that when/if we have to stop the + * transport for a locate, we know that it is triggered + * by loop-changing, and we do not cancel play loop + */ + + loop_changing = true; + if (_transport_sample < location->start() || _transport_sample > location->end()) { // new loop range excludes current transport // sample => relocate to beginning of loop and roll. - request_locate (location->start(), true); - } else if (!loop_changing) { + request_locate (location->start(), true); - // schedule a locate-roll to refill the diskstreams at the - // previous loop end + } - loop_changing = true; + // schedule a buffer overwrite to refill buffers with the new loop. - if (location->end() > last_loopend) { - clear_events (SessionEvent::LocateRoll); - SessionEvent *ev = new SessionEvent (SessionEvent::LocateRoll, SessionEvent::Add, last_loopend, last_loopend, 0, true); - queue_event (ev); - } - } + request_overwrite_buffer (boost::shared_ptr<Track>()); } } else { |