summaryrefslogtreecommitdiffstats
path: root/src/libs/engine/NodeBase.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2007-09-19 21:16:18 +0000
committerDavid Robillard <d@drobilla.net>2007-09-19 21:16:18 +0000
commit0b8415c61e321d032d62b5b1cbda65bab6f178d7 (patch)
tree7ed101634641999660e697cf2e6a5f1415b9b438 /src/libs/engine/NodeBase.cpp
parenta054212abbdb26e03ca42c91d0c86819d445bc5f (diff)
downloadingen-0b8415c61e321d032d62b5b1cbda65bab6f178d7.tar.gz
ingen-0b8415c61e321d032d62b5b1cbda65bab6f178d7.tar.bz2
ingen-0b8415c61e321d032d62b5b1cbda65bab6f178d7.zip
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
Diffstat (limited to 'src/libs/engine/NodeBase.cpp')
-rw-r--r--src/libs/engine/NodeBase.cpp9
1 files changed, 5 insertions, 4 deletions
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<Node*>())
{
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));
}