From a1e97211b02cc1cd9509617cd3452d731ad7b512 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Fri, 21 Sep 2007 04:01:33 +0000 Subject: Reimplement menu system to be picturey, glade loaded, heirarchial, code reusey, etc. Patch port polyphony toggling. git-svn-id: http://svn.drobilla.net/lad/ingen@745 a436a847-0d15-0410-975c-d299462d15a1 --- src/libs/engine/Port.cpp | 5 ++--- src/libs/engine/Port.hpp | 1 - 2 files changed, 2 insertions(+), 4 deletions(-) (limited to 'src/libs/engine') 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(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* _buffers; // Dynamic polyphony - uint32_t _prepared_poly; Raul::Array* _prepared_buffers; }; -- cgit v1.2.1