diff options
author | David Robillard <d@drobilla.net> | 2015-01-15 19:49:29 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2015-01-15 19:49:29 +0000 |
commit | 4326f8ba71f4af1f3e3c48c9f3a02d8e3e0590f7 (patch) | |
tree | 15d37aa76d390385e847fad8160bd22df52dfe2c /src/server/BlockImpl.hpp | |
parent | 81df927a7faa49fd7057276df6dc67e386ca565c (diff) | |
download | ingen-4326f8ba71f4af1f3e3c48c9f3a02d8e3e0590f7.tar.gz ingen-4326f8ba71f4af1f3e3c48c9f3a02d8e3e0590f7.tar.bz2 ingen-4326f8ba71f4af1f3e3c48c9f3a02d8e3e0590f7.zip |
Node bypass.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@5515 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/server/BlockImpl.hpp')
-rw-r--r-- | src/server/BlockImpl.hpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/server/BlockImpl.hpp b/src/server/BlockImpl.hpp index 58ced1fe..845cd7df 100644 --- a/src/server/BlockImpl.hpp +++ b/src/server/BlockImpl.hpp @@ -84,7 +84,13 @@ public: virtual void deactivate(); /** Return true iff this block is activated */ - bool activated() { return _activated; } + bool activated() const { return _activated; } + + /** Return true iff this block is enabled (not bypassed). */ + bool enabled() const { return _enabled; } + + /** Enable or disable (bypass) this block. */ + void set_enabled(bool e) { _enabled = e; } /** Learn the next incoming MIDI event (for internals) */ virtual void learn() {} @@ -157,6 +163,8 @@ public: void traversed(bool b) { _traversed = b; } protected: + PortImpl* nth_port_by_type(uint32_t n, bool input, PortType type); + PluginImpl* _plugin; Raul::Array<PortImpl*>* _ports; ///< Access in audio thread only Context::ID _context; ///< Context this block runs in @@ -165,6 +173,7 @@ protected: std::list<BlockImpl*> _dependants; ///< Blocks this one's output ports are connected to bool _polyphonic; bool _activated; + bool _enabled; bool _traversed; ///< Flag for process order algorithm }; |