diff options
-rw-r--r-- | src/engine/Event.cpp | 3 | ||||
-rw-r--r-- | src/engine/EventSource.hpp | 3 | ||||
-rw-r--r-- | src/engine/LADSPANode.cpp | 16 |
3 files changed, 11 insertions, 11 deletions
diff --git a/src/engine/Event.cpp b/src/engine/Event.cpp index 8e5c33da..4455a846 100644 --- a/src/engine/Event.cpp +++ b/src/engine/Event.cpp @@ -40,8 +40,7 @@ Event::execute(ProcessContext& context) void Event::post_process() { - // FIXME: Not true witn monolithic GUI/engine - //assert(ThreadManager::current_thread_id() == THREAD_POST_PROCESS); + assert(ThreadManager::current_thread_id() != THREAD_PROCESS); } diff --git a/src/engine/EventSource.hpp b/src/engine/EventSource.hpp index 6d03d544..0e589bdc 100644 --- a/src/engine/EventSource.hpp +++ b/src/engine/EventSource.hpp @@ -49,9 +49,6 @@ public: virtual void deactivate() = 0; virtual void process(PostProcessor& dest, ProcessContext& context) = 0; - -protected: - size_t _capacity; }; diff --git a/src/engine/LADSPANode.cpp b/src/engine/LADSPANode.cpp index 7915566a..b695befa 100644 --- a/src/engine/LADSPANode.cpp +++ b/src/engine/LADSPANode.cpp @@ -256,12 +256,16 @@ LADSPANode::activate() NodeBase::activate(); for (uint32_t i=0; i < _polyphony; ++i) { - for (unsigned long j=0; j < _descriptor->PortCount; ++j) { - set_port_buffer(i, j, _ports->at(j)->buffer(i)); - /* if (port->type() == DataType::FLOAT && port->buffer_size() == 1) - port->set_value(0.0f, 0); // FIXME - else if (port->type() == DataType::FLOAT && port->buffer_size() > 1) - port->set_value(0.0f, 0);*/ + for (unsigned long j=0; j < num_ports(); ++j) { + PortImpl* const port = _ports->at(j); + + set_port_buffer(i, j, port->buffer(i)); + + if (port->type() == DataType::CONTROL) { + ((AudioBuffer*)port->buffer(i))->set_value(port->value().get_float(), 0, 0); + } else if (port->type() == DataType::AUDIO) { + ((AudioBuffer*)port->buffer(i))->set_value(0.0f, 0, 0); + } } if (_descriptor->activate != NULL) _descriptor->activate((*_instances)[i]); |