From 3d89115a67a9c947a28539ffdd2399808a53279b Mon Sep 17 00:00:00 2001 From: David Robillard Date: Mon, 16 Nov 2009 00:30:35 +0000 Subject: Rework objects extension to have "value ports" and "message ports". Make audio and control buffers in ingen actually object buffers (towards interop). Overhaul the hell out of ingen buffer and mixing stuff. git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@2266 a436a847-0d15-0410-975c-d299462d15a1 --- src/engine/OutputPort.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'src/engine/OutputPort.cpp') diff --git a/src/engine/OutputPort.cpp b/src/engine/OutputPort.cpp index 8f6b7751..30d29fa0 100644 --- a/src/engine/OutputPort.cpp +++ b/src/engine/OutputPort.cpp @@ -29,14 +29,15 @@ namespace Ingen { namespace Shared { class Patch; } using namespace Shared; -OutputPort::OutputPort(NodeImpl* parent, +OutputPort::OutputPort(BufferFactory& bufs, + NodeImpl* parent, const string& name, uint32_t index, uint32_t poly, DataType type, const Raul::Atom& value, size_t buffer_size) - : PortImpl(parent, name, index, poly, type, value, buffer_size) + : PortImpl(bufs, parent, name, index, poly, type, value, buffer_size) { if (!dynamic_cast(parent)) add_property("rdf:type", Raul::Atom(Raul::Atom::URI, "lv2:OutputPort")); @@ -49,16 +50,17 @@ OutputPort::OutputPort(NodeImpl* parent, void OutputPort::pre_process(Context& context) { - for (uint32_t i=0; i < _poly; ++i) - buffer(i)->prepare_write(context); + connect_buffers(); + for (uint32_t v = 0; v < _poly; ++v) + buffer(v)->prepare_write(context); } void OutputPort::post_process(Context& context) { - for (uint32_t i=0; i < _poly; ++i) - buffer(i)->prepare_read(context); + for (uint32_t v = 0; v < _poly; ++v) + buffer(v)->prepare_read(context); //cerr << path() << " output post: buffer: " << buffer(0) << endl; -- cgit v1.2.1