From 49d6f5b2cc495052d6c5ddbb0629e178c9a2cc14 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Wed, 19 Sep 2007 02:46:47 +0000 Subject: More work on dynamic polyphony. git-svn-id: http://svn.drobilla.net/lad/ingen@721 a436a847-0d15-0410-975c-d299462d15a1 --- src/libs/engine/Port.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/libs/engine/Port.cpp') diff --git a/src/libs/engine/Port.cpp b/src/libs/engine/Port.cpp index 8f9e9ce7..fe9e2c09 100644 --- a/src/libs/engine/Port.cpp +++ b/src/libs/engine/Port.cpp @@ -37,6 +37,7 @@ Port::Port(Node* const node, const string& name, uint32_t index, uint32_t poly, , _type(type) , _buffer_size(buffer_size) , _fixed_buffers(false) + , _buffers(new Raul::Array(poly)) { assert(node != NULL); assert(_poly > 0); @@ -55,7 +56,7 @@ Port::~Port() } -void +bool Port::prepare_poly(uint32_t poly) { /* FIXME: poly never goes down, harsh on memory.. */ @@ -65,10 +66,12 @@ Port::prepare_poly(uint32_t poly) for (uint32_t i = _poly; i < _prepared_poly; ++i) _buffers->at(i) = BufferFactory::create(_type, _buffer_size); } + + return true; } -void +bool Port::apply_poly(Raul::Maid& maid, uint32_t poly) { assert(poly <= _prepared_poly); @@ -80,6 +83,8 @@ Port::apply_poly(Raul::Maid& maid, uint32_t poly) } _poly = poly; + + return true; } -- cgit v1.2.1