summaryrefslogtreecommitdiff
path: root/libs/ardour/track.cc
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2013-07-30 16:55:33 +0200
committerRobin Gareus <robin@gareus.org>2013-07-30 16:55:33 +0200
commit00f26394a9f4ec5264b67fc79c40bf648e0747bf (patch)
tree1a27ede2f3a88a695cdbed800aad74ba0f515008 /libs/ardour/track.cc
parent44fc92c33d20537fb49cf2811028ea0c12383c32 (diff)
use dedicated buffers for route (and track)
"scratch buffers are by definition scratch and their contents are undefined at all times" "silent buffers are by definition all-zero and should not be used for real data" But track & route were using those for actual data; plugins (which may run in the same thread and may get the same buffers) use them for scratch thereby overwriting real data. In particular get_silent_buffers() (used by LadspaPlugin::connect_and_run) clears the buffer which can holds real data: e.g. via Route::passthru_silence() -> plugin1 -> plugin2 (clears output of plugin1)
Diffstat (limited to 'libs/ardour/track.cc')
-rw-r--r--libs/ardour/track.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/libs/ardour/track.cc b/libs/ardour/track.cc
index 9db8e1ff3a..7d90709b6f 100644
--- a/libs/ardour/track.cc
+++ b/libs/ardour/track.cc
@@ -451,7 +451,7 @@ Track::no_roll (pframes_t nframes, framepos_t start_frame, framepos_t end_frame,
} else {
- BufferSet& bufs = _session.get_scratch_buffers (n_process_buffers());
+ BufferSet& bufs = _session.get_route_buffers (n_process_buffers());
fill_buffers_with_input (bufs, _input, nframes);
@@ -496,7 +496,7 @@ Track::silent_roll (pframes_t nframes, framepos_t /*start_frame*/, framepos_t /*
framecnt_t playback_distance;
- BufferSet& bufs (_session.get_silent_buffers (n_process_buffers()));
+ BufferSet& bufs (_session.get_route_buffers (n_process_buffers(), true));
int const dret = _diskstream->process (bufs, _session.transport_frame(), nframes, playback_distance, false);
need_butler = _diskstream->commit (playback_distance);