summaryrefslogtreecommitdiff
path: root/libs/ardour/ladspa_plugin.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/ladspa_plugin.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/ladspa_plugin.cc')
-rw-r--r--libs/ardour/ladspa_plugin.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/libs/ardour/ladspa_plugin.cc b/libs/ardour/ladspa_plugin.cc
index 1ab00e0b34..5a6e577f2d 100644
--- a/libs/ardour/ladspa_plugin.cc
+++ b/libs/ardour/ladspa_plugin.cc
@@ -562,7 +562,7 @@ LadspaPlugin::connect_and_run (BufferSet& bufs,
cycles_t then = get_cycles ();
BufferSet& silent_bufs = _session.get_silent_buffers(ChanCount(DataType::AUDIO, 1));
- BufferSet& scratch_bufs = _session.get_silent_buffers(ChanCount(DataType::AUDIO, 1));
+ BufferSet& scratch_bufs = _session.get_scratch_buffers(ChanCount(DataType::AUDIO, 1));
uint32_t audio_in_index = 0;
uint32_t audio_out_index = 0;