summaryrefslogtreecommitdiffstats
path: root/src/libs/engine/PortImpl.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2008-01-21 15:14:53 +0000
committerDavid Robillard <d@drobilla.net>2008-01-21 15:14:53 +0000
commitd6b87aa26ef482a8952437f7472b81a2240f01fd (patch)
tree620d233b902c78413dc17ee5f921633251239695 /src/libs/engine/PortImpl.cpp
parent2356f96fbd6c9d70dedcd0d64bf0d72786ea36bb (diff)
downloadingen-d6b87aa26ef482a8952437f7472b81a2240f01fd.tar.gz
ingen-d6b87aa26ef482a8952437f7472b81a2240f01fd.tar.bz2
ingen-d6b87aa26ef482a8952437f7472b81a2240f01fd.zip
Work on generic LV2 events.
git-svn-id: http://svn.drobilla.net/lad/ingen@1090 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/libs/engine/PortImpl.cpp')
-rw-r--r--src/libs/engine/PortImpl.cpp14
1 files changed, 4 insertions, 10 deletions
diff --git a/src/libs/engine/PortImpl.cpp b/src/libs/engine/PortImpl.cpp
index ec27092a..4fc61c20 100644
--- a/src/libs/engine/PortImpl.cpp
+++ b/src/libs/engine/PortImpl.cpp
@@ -22,8 +22,7 @@
#include "NodeImpl.hpp"
#include "interface/DataType.hpp"
#include "AudioBuffer.hpp"
-#include "MidiBuffer.hpp"
-#include "OSCBuffer.hpp"
+#include "EventBuffer.hpp"
#include "BufferFactory.hpp"
#include "ProcessContext.hpp"
#include "SendPortActivityEvent.hpp"
@@ -58,7 +57,7 @@ PortImpl::PortImpl(NodeImpl* const node,
if (node->parent() == NULL)
_polyphonic = false;
- if (type == DataType::MIDI || type == DataType::OSC)
+ if (type == DataType::EVENT)
_broadcast = true; // send activity blips
assert(_buffers->size() > 0);
@@ -180,13 +179,8 @@ PortImpl::broadcast(ProcessContext& context)
context.event_sink().write(sizeof(ev), &ev);
_last_broadcasted_value = value;
}
- } else if (_type == DataType::MIDI) {
- if (((MidiBuffer*)buffer(0))->event_count() > 0) {
- const SendPortActivityEvent ev(context.engine(), context.start(), this);
- context.event_sink().write(sizeof(ev), &ev);
- }
- } else if (_type == DataType::OSC) {
- if (((OSCBuffer*)buffer(0))->event_count() > 0) {
+ } else if (_type == DataType::EVENT) {
+ if (((EventBuffer*)buffer(0))->event_count() > 0) {
const SendPortActivityEvent ev(context.engine(), context.start(), this);
context.event_sink().write(sizeof(ev), &ev);
}