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/thread_buffers.cc | 2 ++ 1 file changed, 2 insertions(+) (limited to 'libs/ardour/thread_buffers.cc') diff --git a/libs/ardour/thread_buffers.cc b/libs/ardour/thread_buffers.cc index 34f6f9828b..fd3160bb15 100644 --- a/libs/ardour/thread_buffers.cc +++ b/libs/ardour/thread_buffers.cc @@ -30,6 +30,7 @@ using namespace std; ThreadBuffers::ThreadBuffers () : silent_buffers (new BufferSet) , scratch_buffers (new BufferSet) + , route_buffers (new BufferSet) , mix_buffers (new BufferSet) , gain_automation_buffer (0) , send_gain_automation_buffer (0) @@ -64,6 +65,7 @@ ThreadBuffers::ensure_buffers (ChanCount howmany) scratch_buffers->ensure_buffers (*t, count, size); mix_buffers->ensure_buffers (*t, count, size); silent_buffers->ensure_buffers (*t, count, size); + route_buffers->ensure_buffers (*t, count, size); } delete [] gain_automation_buffer; -- cgit v1.2.3