From 615ceaaf519d0c42a9215c4835e1f7348f2e5dca Mon Sep 17 00:00:00 2001 From: David Robillard Date: Thu, 20 Sep 2007 20:54:31 +0000 Subject: Remove useless InternalNode class. Percolate boolean polyphony down through Node class heirarchy (instead of integer). git-svn-id: http://svn.drobilla.net/lad/ingen@742 a436a847-0d15-0410-975c-d299462d15a1 --- src/libs/engine/NodeBase.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'src/libs/engine/NodeBase.cpp') diff --git a/src/libs/engine/NodeBase.cpp b/src/libs/engine/NodeBase.cpp index e8df05d6..90d5864f 100644 --- a/src/libs/engine/NodeBase.cpp +++ b/src/libs/engine/NodeBase.cpp @@ -33,10 +33,10 @@ using std::cout; using std::cerr; using std::endl; namespace Ingen { -NodeBase::NodeBase(const Plugin* plugin, const string& name, bool poly, Patch* parent, SampleRate srate, size_t buffer_size) -: Node(parent, name, poly), +NodeBase::NodeBase(const Plugin* plugin, const string& name, bool polyphonic, Patch* parent, SampleRate srate, size_t buffer_size) +: Node(parent, name, polyphonic), _plugin(plugin), - _polyphony(parent ? parent->internal_poly() : 1), + _polyphony((polyphonic && parent) ? parent->internal_poly() : 1), _srate(srate), _buffer_size(buffer_size), _activated(false), @@ -85,6 +85,9 @@ NodeBase::deactivate() bool NodeBase::prepare_poly(uint32_t poly) { + if (!_polyphonic) + return true; + if (_ports) for (size_t i=0; i < _ports->size(); ++i) _ports->at(i)->prepare_poly(poly); @@ -96,6 +99,9 @@ NodeBase::prepare_poly(uint32_t poly) bool NodeBase::apply_poly(Raul::Maid& maid, uint32_t poly) { + if (!_polyphonic) + return true; + if (_ports) for (size_t i=0; i < _ports->size(); ++i) _ports->at(i)->apply_poly(maid, poly); -- cgit v1.2.1