summaryrefslogtreecommitdiffstats
path: root/src/engine
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2008-11-24 21:27:17 +0000
committerDavid Robillard <d@drobilla.net>2008-11-24 21:27:17 +0000
commite2fe97ce0d326c4b9b2669fafadaaedde81d2645 (patch)
tree884fb288cbc0d8680a5c6cdaa2948be2eb3e4b82 /src/engine
parent5d213f69c2bed3a4059a78128780bb54ea17b4e3 (diff)
downloadingen-e2fe97ce0d326c4b9b2669fafadaaedde81d2645.tar.gz
ingen-e2fe97ce0d326c4b9b2669fafadaaedde81d2645.tar.bz2
ingen-e2fe97ce0d326c4b9b2669fafadaaedde81d2645.zip
Cleanups.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@1780 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/engine')
-rw-r--r--src/engine/Event.cpp3
-rw-r--r--src/engine/EventSource.hpp3
-rw-r--r--src/engine/LADSPANode.cpp16
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]);