summaryrefslogtreecommitdiff
path: root/libs/ardour/session_butler.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2019-12-10 09:28:41 -0700
committerPaul Davis <paul@linuxaudiosystems.com>2019-12-10 09:29:22 -0700
commitc3e3930f149667666a2e5b851d02a4bed1cfb9d9 (patch)
tree3833506a9e1a9ffe7cd052b34bf95c2897d38c15 /libs/ardour/session_butler.cc
parent7457fd2e27b4b10e3d5cd8fa0d5d1d45abbeae48 (diff)
revert to single buffer for disk playback, and 5.x-style overwrite
Also address issues with MIDI and also atomicity of _pending_overwrite
Diffstat (limited to 'libs/ardour/session_butler.cc')
-rw-r--r--libs/ardour/session_butler.cc9
1 files changed, 5 insertions, 4 deletions
diff --git a/libs/ardour/session_butler.cc b/libs/ardour/session_butler.cc
index e7c250833e..0744df6233 100644
--- a/libs/ardour/session_butler.cc
+++ b/libs/ardour/session_butler.cc
@@ -78,15 +78,16 @@ Session::schedule_capture_buffering_adjustment ()
}
void
-Session::request_overwrite_buffer (boost::shared_ptr<Track> t)
+Session::request_overwrite_buffer (boost::shared_ptr<Track> t, OverwriteReason why)
{
SessionEvent *ev = new SessionEvent (SessionEvent::Overwrite, SessionEvent::Add, SessionEvent::Immediate, 0, 0, 0.0);
ev->set_track (t);
+ ev->overwrite = why;
queue_event (ev);
}
void
-Session::overwrite_some_buffers (boost::shared_ptr<Route> r)
+Session::overwrite_some_buffers (boost::shared_ptr<Route> r, OverwriteReason why)
{
/* this is called from the process thread while handling queued
* SessionEvents. Therefore neither playback sample or read offsets in
@@ -102,7 +103,7 @@ Session::overwrite_some_buffers (boost::shared_ptr<Route> r)
if (r) {
boost::shared_ptr<Track> t = boost::dynamic_pointer_cast<Track> (r);
assert (t);
- t->set_pending_overwrite ();
+ t->set_pending_overwrite (why);
} else {
@@ -110,7 +111,7 @@ Session::overwrite_some_buffers (boost::shared_ptr<Route> r)
for (RouteList::iterator i = rl->begin(); i != rl->end(); ++i) {
boost::shared_ptr<Track> tr = boost::dynamic_pointer_cast<Track> (*i);
if (tr) {
- tr->set_pending_overwrite ();
+ tr->set_pending_overwrite (why);
}
}
}