summaryrefslogtreecommitdiffstats
path: root/src/server/InternalBlock.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2015-11-14 19:22:09 -0500
committerDavid Robillard <d@drobilla.net>2016-09-11 14:41:18 +0200
commitd1e58b25654ab25607329afacc9a23d829267637 (patch)
tree8b1f1b0f3019650211cb4815cf0ba5d25ba4127d /src/server/InternalBlock.cpp
parent7dd82030ec60df74db7be51a6b8b3bb4a8a9f5a3 (diff)
downloadingen-d1e58b25654ab25607329afacc9a23d829267637.tar.gz
ingen-d1e58b25654ab25607329afacc9a23d829267637.tar.bz2
ingen-d1e58b25654ab25607329afacc9a23d829267637.zip
Fix buffer copying for various types
Diffstat (limited to 'src/server/InternalBlock.cpp')
-rw-r--r--src/server/InternalBlock.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/server/InternalBlock.cpp b/src/server/InternalBlock.cpp
index 5fa0bdc0..308cb640 100644
--- a/src/server/InternalBlock.cpp
+++ b/src/server/InternalBlock.cpp
@@ -31,15 +31,17 @@ InternalBlock::InternalBlock(PluginImpl* plugin,
void
-InternalBlock::pre_process(ProcessContext& context) {
- /* Output sequences are initialized in LV2 format, an atom:Chunk with size
- set to the capacity of the buffer. Internal nodes don't care, so clear
- to an empty sequences so appending events results in a valid output. */
+InternalBlock::pre_process(ProcessContext& context)
+{
for (uint32_t i = 0; i < num_ports(); ++i) {
PortImpl* const port = _ports->at(i);
if (port->is_input()) {
port->pre_process(context);
- } else {
+ } else if (port->buffer_type() == _plugin->uris().atom_Sequence) {
+ /* Output sequences are initialized in LV2 format, an atom:Chunk
+ with size set to the capacity of the buffer. Internal nodes
+ don't care, so clear to an empty sequences so appending events
+ results in a valid output. */
for (uint32_t v = 0; v < port->poly(); ++v) {
port->buffer(v)->clear();
}