summaryrefslogtreecommitdiff
path: root/libs/ardour/session.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2019-12-05 13:00:24 -0700
committerPaul Davis <paul@linuxaudiosystems.com>2019-12-05 13:13:16 -0700
commit8b4e71400695acd1dad3598965e92455272c0562 (patch)
tree005b3ba56852be841a0224a1c013c9c754b0502b /libs/ardour/session.cc
parent551702b9e9e8766ba2f9723d23585c914803bf89 (diff)
changes to use overwrite-buffers when loop is disabled or loop range changed
Diffstat (limited to 'libs/ardour/session.cc')
-rw-r--r--libs/ardour/session.cc23
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 {