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.hpp | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'src/libs/engine/NodeBase.hpp') 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; -- cgit v1.2.1