summaryrefslogtreecommitdiffstats
path: root/src/libs/engine/Port.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2007-09-21 04:01:33 +0000
committerDavid Robillard <d@drobilla.net>2007-09-21 04:01:33 +0000
commita1e97211b02cc1cd9509617cd3452d731ad7b512 (patch)
tree09fc6e10ce01b6975fc69f3f14bf031919264d80 /src/libs/engine/Port.cpp
parent2fd281a285e4b0bc31e0a0dc6f970359440612c8 (diff)
downloadingen-a1e97211b02cc1cd9509617cd3452d731ad7b512.tar.gz
ingen-a1e97211b02cc1cd9509617cd3452d731ad7b512.tar.bz2
ingen-a1e97211b02cc1cd9509617cd3452d731ad7b512.zip
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
Diffstat (limited to 'src/libs/engine/Port.cpp')
-rw-r--r--src/libs/engine/Port.cpp5
1 files changed, 2 insertions, 3 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) {