summaryrefslogtreecommitdiffstats
path: root/src/engine/OutputPort.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/engine/OutputPort.cpp')
-rw-r--r--src/engine/OutputPort.cpp15
1 files changed, 12 insertions, 3 deletions
diff --git a/src/engine/OutputPort.cpp b/src/engine/OutputPort.cpp
index c6ad3356..269d6da6 100644
--- a/src/engine/OutputPort.cpp
+++ b/src/engine/OutputPort.cpp
@@ -46,15 +46,24 @@ OutputPort::OutputPort(BufferFactory& bufs,
if (type == PortType::CONTROL)
_broadcast = true;
+
+ setup_buffers(bufs, poly);
+}
+
+
+void
+OutputPort::get_buffers(BufferFactory& bufs, Raul::Array<BufferFactory::Ref>* buffers, uint32_t poly)
+{
+ for (uint32_t v = 0; v < poly; ++v)
+ buffers->at(v) = bufs.get(_type, _buffer_size);
}
void
OutputPort::pre_process(Context& context)
{
- connect_buffers();
for (uint32_t v = 0; v < _poly; ++v)
- buffer(v)->prepare_write(context);
+ _buffers->at(v)->prepare_write(context);
}
@@ -62,7 +71,7 @@ void
OutputPort::post_process(Context& context)
{
for (uint32_t v = 0; v < _poly; ++v)
- buffer(v)->prepare_read(context);
+ _buffers->at(v)->prepare_read(context);
if (_broadcast)
broadcast_value(context, false);