diff options
author | David Robillard <d@drobilla.net> | 2015-11-14 19:22:09 -0500 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2016-09-11 14:41:18 +0200 |
commit | d1e58b25654ab25607329afacc9a23d829267637 (patch) | |
tree | 8b1f1b0f3019650211cb4815cf0ba5d25ba4127d /src/server/InternalBlock.cpp | |
parent | 7dd82030ec60df74db7be51a6b8b3bb4a8a9f5a3 (diff) | |
download | ingen-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.cpp | 12 |
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(); } |