diff options
author | David Robillard <d@drobilla.net> | 2009-06-03 02:30:57 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2009-06-03 02:30:57 +0000 |
commit | 6488ffb1a3fedb87b41add3a2a78a953755c949a (patch) | |
tree | ac2c564c1f93b207940419aea265022d48c71240 /src/engine/events | |
parent | 69ad5f645fbc1ac5c4f886a7f2daa6c354b4afe3 (diff) | |
download | ingen-6488ffb1a3fedb87b41add3a2a78a953755c949a.tar.gz ingen-6488ffb1a3fedb87b41add3a2a78a953755c949a.tar.bz2 ingen-6488ffb1a3fedb87b41add3a2a78a953755c949a.zip |
Clean up and shave some overhead from port value broadcasting.
Clean up duplex port code and document weird semantics.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@2075 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/engine/events')
-rw-r--r-- | src/engine/events/SetMetadata.cpp | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/src/engine/events/SetMetadata.cpp b/src/engine/events/SetMetadata.cpp index bc73e793..e991bcf5 100644 --- a/src/engine/events/SetMetadata.cpp +++ b/src/engine/events/SetMetadata.cpp @@ -185,30 +185,30 @@ SetMetadata::execute(ProcessContext& context) PortImpl* port = 0; GraphObjectImpl* object = 0; switch (*t) { - case ENABLE_BROADCAST: - if ((port = dynamic_cast<PortImpl*>(_object))) - port->broadcast(value.get_bool()); - break; - case ENABLE: - if (value.get_bool()) { - if (!_patch->compiled_patch()) - _patch->compiled_patch(_compiled_patch); - _patch->enable(); - } else { - _patch->disable(); - } - break; - case POLYPHONIC: - if ((object = dynamic_cast<GraphObjectImpl*>(_object))) - if (!object->set_polyphonic(*_engine.maid(), value.get_bool())) - _error = INTERNAL; - break; - case POLYPHONY: - if (!_patch->apply_internal_poly(*_engine.maid(), value.get_int32())) + case ENABLE_BROADCAST: + if ((port = dynamic_cast<PortImpl*>(_object))) + port->broadcast(value.get_bool()); + break; + case ENABLE: + if (value.get_bool()) { + if (!_patch->compiled_patch()) + _patch->compiled_patch(_compiled_patch); + _patch->enable(); + } else { + _patch->disable(); + } + break; + case POLYPHONIC: + if ((object = dynamic_cast<GraphObjectImpl*>(_object))) + if (!object->set_polyphonic(*_engine.maid(), value.get_bool())) _error = INTERNAL; - break; - default: - _success = true; + break; + case POLYPHONY: + if (!_patch->apply_internal_poly(*_engine.maid(), value.get_int32())) + _error = INTERNAL; + break; + default: + _success = true; } } |