summaryrefslogtreecommitdiffstats
path: root/src/server/events
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2015-01-15 19:49:29 +0000
committerDavid Robillard <d@drobilla.net>2015-01-15 19:49:29 +0000
commit4326f8ba71f4af1f3e3c48c9f3a02d8e3e0590f7 (patch)
tree15d37aa76d390385e847fad8160bd22df52dfe2c /src/server/events
parent81df927a7faa49fd7057276df6dc67e386ca565c (diff)
downloadingen-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/events')
-rw-r--r--src/server/events/Delta.cpp22
1 files changed, 16 insertions, 6 deletions
diff --git a/src/server/events/Delta.cpp b/src/server/events/Delta.cpp
index c3d4e458..f1acbdc2 100644
--- a/src/server/events/Delta.cpp
+++ b/src/server/events/Delta.cpp
@@ -209,6 +209,12 @@ Delta::pre_process()
} else if ((block = dynamic_cast<BlockImpl*>(_object))) {
if (key == uris.midi_binding && value == uris.patch_wildcard) {
op = SpecialType::CONTROL_BINDING; // Internal block learn
+ } else if (key == uris.ingen_enabled) {
+ if (value.type() == uris.forge.Bool) {
+ op = SpecialType::ENABLE;
+ } else {
+ _status = Status::BAD_VALUE_TYPE;
+ }
}
}
@@ -316,13 +322,17 @@ Delta::execute(ProcessContext& context)
}
break;
case SpecialType::ENABLE:
- if (value.get<int32_t>()) {
- if (_compiled_graph) {
- _graph->set_compiled_graph(_compiled_graph);
+ if (_graph) {
+ if (value.get<int32_t>()) {
+ if (_compiled_graph) {
+ _graph->set_compiled_graph(_compiled_graph);
+ }
+ _graph->enable();
+ } else {
+ _graph->disable(context);
}
- _graph->enable();
- } else {
- _graph->disable(context);
+ } else if (block) {
+ block->set_enabled(value.get<int32_t>());
}
break;
case SpecialType::POLYPHONIC: {