use dedicated buffers for route (and track)
authorRobin Gareus <robin@gareus.org>
Tue, 30 Jul 2013 14:55:33 +0000 (16:55 +0200)
committerRobin Gareus <robin@gareus.org>
Tue, 30 Jul 2013 14:55:33 +0000 (16:55 +0200)
commit00f26394a9f4ec5264b67fc79c40bf648e0747bf
tree1a27ede2f3a88a695cdbed800aad74ba0f515008
parent44fc92c33d20537fb49cf2811028ea0c12383c32
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/ardour/process_thread.h
libs/ardour/ardour/session.h
libs/ardour/ardour/thread_buffers.h
libs/ardour/ladspa_plugin.cc
libs/ardour/process_thread.cc
libs/ardour/route.cc
libs/ardour/session.cc
libs/ardour/thread_buffers.cc
libs/ardour/track.cc