From 0b8415c61e321d032d62b5b1cbda65bab6f178d7 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Wed, 19 Sep 2007 21:16:18 +0000 Subject: Tidy up OSC namespace to use OSC true/false instead of C style boolean integers. Fully separate concept of "polyphonic" (boolean node property) from "polyphony" (integer patch/node property). Ability to add "polyphonic" nodes to poly=1 patches (in case poly is changed later). git-svn-id: http://svn.drobilla.net/lad/ingen@732 a436a847-0d15-0410-975c-d299462d15a1 --- src/libs/engine/NodeBase.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/libs/engine/NodeBase.cpp') diff --git a/src/libs/engine/NodeBase.cpp b/src/libs/engine/NodeBase.cpp index 35d3be4e..faef4a32 100644 --- a/src/libs/engine/NodeBase.cpp +++ b/src/libs/engine/NodeBase.cpp @@ -33,10 +33,11 @@ using std::cout; using std::cerr; using std::endl; namespace Ingen { -NodeBase::NodeBase(const Plugin* plugin, const string& name, uint32_t poly, Patch* parent, SampleRate srate, size_t buffer_size) +NodeBase::NodeBase(const Plugin* plugin, const string& name, bool poly, Patch* parent, SampleRate srate, size_t buffer_size) : Node(parent, name), _plugin(plugin), - _poly(poly), + _polyphonic(poly), + _polyphony(parent ? parent->internal_poly() : 1), _srate(srate), _buffer_size(buffer_size), _activated(false), @@ -49,8 +50,8 @@ NodeBase::NodeBase(const Plugin* plugin, const string& name, uint32_t poly, Patc _dependants(new Raul::List()) { assert(_plugin); - assert(_poly > 0); - assert(_parent == NULL || (_poly == parent->internal_poly() || _poly == 1)); + assert(_polyphony > 0); + assert(_parent == NULL || (_polyphony == parent->internal_poly() || _polyphony == 1)); } -- cgit v1.2.1