From 00f26394a9f4ec5264b67fc79c40bf648e0747bf Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Tue, 30 Jul 2013 16:55:33 +0200 Subject: 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) --- libs/ardour/ladspa_plugin.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libs/ardour/ladspa_plugin.cc') 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; -- cgit v1.2.3