summaryrefslogtreecommitdiffstats
path: root/src/libs/engine/NodeBase.hpp
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.hpp
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.hpp')
-rw-r--r--src/libs/engine/NodeBase.hpp15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/libs/engine/NodeBase.hpp b/src/libs/engine/NodeBase.hpp
index e74c0d12..8e1bb7f3 100644
--- a/src/libs/engine/NodeBase.hpp
+++ b/src/libs/engine/NodeBase.hpp
@@ -47,7 +47,12 @@ namespace Shared {
class NodeBase : public Node
{
public:
- NodeBase(const Plugin* plugin, const string& name, uint32_t poly, Patch* parent, SampleRate srate, size_t buffer_size);
+ NodeBase(const Plugin* plugin,
+ const string& name,
+ bool poly,
+ Patch* parent,
+ SampleRate rate,
+ size_t buffer_size);
virtual ~NodeBase();
@@ -75,7 +80,8 @@ public:
SampleRate sample_rate() const { return _srate; }
size_t buffer_size() const { return _buffer_size; }
uint32_t num_ports() const { return _ports ? _ports->size() : 0; }
- uint32_t poly() const { return _poly; }
+ bool polyphonic() const { return _polyphonic; }
+ uint32_t polyphony() const { return _polyphony; }
bool traversed() const { return _traversed; }
void traversed(bool b) { _traversed = b; }
@@ -94,14 +100,15 @@ public:
virtual const Plugin* plugin() const { return _plugin; }
/** A node's parent is always a patch, so static cast should be safe */
- Patch* parent_patch() const { return (Patch*)_parent; }
+ inline Patch* parent_patch() const { return (Patch*)_parent; }
protected:
virtual void signal_input_ready();
const Plugin* _plugin;
- uint32_t _poly;
+ bool _polyphonic;
+ uint32_t _polyphony;
SampleRate _srate;
size_t _buffer_size;
bool _activated;