diff options
author | Robin Gareus <robin@gareus.org> | 2020-04-12 13:35:21 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2020-04-12 13:35:21 +0200 |
commit | fc34626e501ed5c64400f222028e34691f67efa2 (patch) | |
tree | 06426b6f1684c6703ca4df23019b5564699c968b /libs | |
parent | 68ecf6c0b33e1348523f7540d1a2603321a915bc (diff) |
Fix loop range changes while playing - #8001
Since ead883302fe800ae, it is no longer possible to use a null
pointer SessionEvent::track as flag to indicate overriding all
buffers.
Diffstat (limited to 'libs')
-rw-r--r-- | libs/ardour/ardour/session_event.h | 1 | ||||
-rw-r--r-- | libs/ardour/session.cc | 7 | ||||
-rw-r--r-- | libs/ardour/session_butler.cc | 1 | ||||
-rw-r--r-- | libs/ardour/session_process.cc | 4 |
4 files changed, 10 insertions, 3 deletions
diff --git a/libs/ardour/ardour/session_event.h b/libs/ardour/ardour/session_event.h index 9eeecb9a56..79acec3bcf 100644 --- a/libs/ardour/ardour/session_event.h +++ b/libs/ardour/ardour/session_event.h @@ -53,6 +53,7 @@ public: RangeStop, RangeLocate, Overwrite, + OverwriteAll, Audition, SetPlayAudioRange, CancelPlayAudioRange, diff --git a/libs/ardour/session.cc b/libs/ardour/session.cc index 2b0b9c0921..900cd90372 100644 --- a/libs/ardour/session.cc +++ b/libs/ardour/session.cc @@ -1549,9 +1549,10 @@ Session::auto_loop_changed (Location* location) } else { - // schedule a buffer overwrite to refill buffers with the new loop. - - request_overwrite_buffer (boost::shared_ptr<Track>(), LoopChanged); + /* schedule a buffer overwrite to refill buffers with the new loop. */ + SessionEvent *ev = new SessionEvent (SessionEvent::OverwriteAll, SessionEvent::Add, SessionEvent::Immediate, 0, 0, 0.0); + ev->overwrite = LoopChanged; + queue_event (ev); } } diff --git a/libs/ardour/session_butler.cc b/libs/ardour/session_butler.cc index 143c9d540d..ee8fc08f3b 100644 --- a/libs/ardour/session_butler.cc +++ b/libs/ardour/session_butler.cc @@ -79,6 +79,7 @@ Session::schedule_capture_buffering_adjustment () void Session::request_overwrite_buffer (boost::shared_ptr<Track> t, OverwriteReason why) { + assert (t); SessionEvent *ev = new SessionEvent (SessionEvent::Overwrite, SessionEvent::Add, SessionEvent::Immediate, 0, 0, 0.0); ev->set_track (t); ev->overwrite = why; diff --git a/libs/ardour/session_process.cc b/libs/ardour/session_process.cc index 089aed7c03..f5613d3af4 100644 --- a/libs/ardour/session_process.cc +++ b/libs/ardour/session_process.cc @@ -954,6 +954,10 @@ Session::process_event (SessionEvent* ev) } break; + case SessionEvent::OverwriteAll: + overwrite_some_buffers (boost::shared_ptr<Track>(), ev->overwrite); + break; + case SessionEvent::Audition: set_audition (ev->region); // drop reference to region |