summaryrefslogtreecommitdiffstats
path: root/src/libs/engine/Port.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/libs/engine/Port.cpp')
-rw-r--r--src/libs/engine/Port.cpp9
1 files changed, 7 insertions, 2 deletions
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<Buffer*>(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;
}