summaryrefslogtreecommitdiff
path: root/libs/ardour/process_thread.cc
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2016-03-26 00:40:51 +0100
committerRobin Gareus <robin@gareus.org>2016-03-26 00:40:51 +0100
commit0954efffd3a1d642be313aed9b5b7070eb307a9c (patch)
tree8ff57f420d943497006f20e484dae304d41f7e02 /libs/ardour/process_thread.cc
parent6d735dafe2ff8596b5ca096e06e9badd4c57fdf7 (diff)
add "no-inplace" buffers.
When allowing to cross-connect plugin-ports, inplace processing can no longer be used. We need a complete set of independent input and output buffers. Since scratch and silent buffers are used by the various plugin implementations we cannot re-use them in the PluginInsert. Besides we need a complete BufferSet which can hold both: ins + outs.
Diffstat (limited to 'libs/ardour/process_thread.cc')
-rw-r--r--libs/ardour/process_thread.cc19
1 files changed, 19 insertions, 0 deletions
diff --git a/libs/ardour/process_thread.cc b/libs/ardour/process_thread.cc
index cf48c50c70..efcc47fee3 100644
--- a/libs/ardour/process_thread.cc
+++ b/libs/ardour/process_thread.cc
@@ -117,6 +117,25 @@ ProcessThread::get_scratch_buffers (ChanCount count, bool silence)
}
BufferSet&
+ProcessThread::get_noinplace_buffers (ChanCount count)
+{
+ ThreadBuffers* tb = _private_thread_buffers.get();
+ assert (tb);
+
+ BufferSet* sb = tb->noinplace_buffers;
+ assert (sb);
+
+ if (count != ChanCount::ZERO) {
+ assert(sb->available() >= count);
+ sb->set_count (count);
+ } else {
+ sb->set_count (sb->available());
+ }
+
+ return *sb;
+}
+
+BufferSet&
ProcessThread::get_route_buffers (ChanCount count, bool silence)
{
ThreadBuffers* tb = _private_thread_buffers.get();