From d6b87aa26ef482a8952437f7472b81a2240f01fd Mon Sep 17 00:00:00 2001 From: David Robillard Date: Mon, 21 Jan 2008 15:14:53 +0000 Subject: Work on generic LV2 events. git-svn-id: http://svn.drobilla.net/lad/ingen@1090 a436a847-0d15-0410-975c-d299462d15a1 --- src/libs/engine/PortImpl.cpp | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) (limited to 'src/libs/engine/PortImpl.cpp') 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); } -- cgit v1.2.1