summaryrefslogtreecommitdiffstats
path: root/src/libs/engine
diff options
context:
space:
mode:
Diffstat (limited to 'src/libs/engine')
-rw-r--r--src/libs/engine/Port.cpp5
-rw-r--r--src/libs/engine/Port.hpp1
2 files changed, 2 insertions, 4 deletions
diff --git a/src/libs/engine/Port.cpp b/src/libs/engine/Port.cpp
index 30ee73f2..8613581d 100644
--- a/src/libs/engine/Port.cpp
+++ b/src/libs/engine/Port.cpp
@@ -70,8 +70,7 @@ Port::prepare_poly(uint32_t poly)
/* FIXME: poly never goes down, harsh on memory.. */
if (poly > _poly) {
_prepared_buffers = new Raul::Array<Buffer*>(poly, *_buffers);
- _prepared_poly = poly;
- for (uint32_t i = _poly; i < _prepared_poly; ++i)
+ for (uint32_t i = _poly; i < _prepared_buffers->size(); ++i)
_prepared_buffers->at(i) = BufferFactory::create(_type, _buffer_size);
}
@@ -85,7 +84,7 @@ Port::apply_poly(Raul::Maid& maid, uint32_t poly)
if (!_polyphonic || !_parent->polyphonic())
return true;
- assert(poly <= _prepared_poly);
+ assert(poly <= _prepared_buffers->size());
// Apply a new set of buffers from a preceding call to prepare_poly
if (_prepared_buffers && _buffers != _prepared_buffers) {
diff --git a/src/libs/engine/Port.hpp b/src/libs/engine/Port.hpp
index 64fde9cc..f0b7ec25 100644
--- a/src/libs/engine/Port.hpp
+++ b/src/libs/engine/Port.hpp
@@ -101,7 +101,6 @@ protected:
Raul::Array<Buffer*>* _buffers;
// Dynamic polyphony
- uint32_t _prepared_poly;
Raul::Array<Buffer*>* _prepared_buffers;
};