diff options
author | Robin Gareus <robin@gareus.org> | 2013-07-30 16:55:33 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2013-07-30 16:55:33 +0200 |
commit | 00f26394a9f4ec5264b67fc79c40bf648e0747bf (patch) | |
tree | 1a27ede2f3a88a695cdbed800aad74ba0f515008 /libs/ardour/ardour | |
parent | 44fc92c33d20537fb49cf2811028ea0c12383c32 (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/ardour')
-rw-r--r-- | libs/ardour/ardour/process_thread.h | 1 | ||||
-rw-r--r-- | libs/ardour/ardour/session.h | 1 | ||||
-rw-r--r-- | libs/ardour/ardour/thread_buffers.h | 1 |
3 files changed, 3 insertions, 0 deletions
diff --git a/libs/ardour/ardour/process_thread.h b/libs/ardour/ardour/process_thread.h index 0c197e9fb2..399cd506a3 100644 --- a/libs/ardour/ardour/process_thread.h +++ b/libs/ardour/ardour/process_thread.h @@ -46,6 +46,7 @@ public: static BufferSet& get_silent_buffers (ChanCount count = ChanCount::ZERO); static BufferSet& get_scratch_buffers (ChanCount count = ChanCount::ZERO); + static BufferSet& get_route_buffers (ChanCount count = ChanCount::ZERO, bool silence = false); static BufferSet& get_mix_buffers (ChanCount count = ChanCount::ZERO); static gain_t* gain_automation_buffer (); static gain_t* send_gain_automation_buffer (); diff --git a/libs/ardour/ardour/session.h b/libs/ardour/ardour/session.h index 9ae67bf6b1..3bd57319bb 100644 --- a/libs/ardour/ardour/session.h +++ b/libs/ardour/ardour/session.h @@ -201,6 +201,7 @@ class Session : public PBD::StatefulDestructible, public PBD::ScopedConnectionLi BufferSet& get_silent_buffers (ChanCount count = ChanCount::ZERO); BufferSet& get_scratch_buffers (ChanCount count = ChanCount::ZERO); + BufferSet& get_route_buffers (ChanCount count = ChanCount::ZERO, bool silence = true); BufferSet& get_mix_buffers (ChanCount count = ChanCount::ZERO); bool have_rec_enabled_track () const; diff --git a/libs/ardour/ardour/thread_buffers.h b/libs/ardour/ardour/thread_buffers.h index cd0b76511a..9d92454887 100644 --- a/libs/ardour/ardour/thread_buffers.h +++ b/libs/ardour/ardour/thread_buffers.h @@ -38,6 +38,7 @@ public: BufferSet* silent_buffers; BufferSet* scratch_buffers; + BufferSet* route_buffers; BufferSet* mix_buffers; gain_t* gain_automation_buffer; gain_t* send_gain_automation_buffer; |