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/events/SetPortValueQueuedEvent.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/libs/engine/events/SetPortValueQueuedEvent.cpp') diff --git a/src/libs/engine/events/SetPortValueQueuedEvent.cpp b/src/libs/engine/events/SetPortValueQueuedEvent.cpp index 7d11b1ae..28bb6df1 100644 --- a/src/libs/engine/events/SetPortValueQueuedEvent.cpp +++ b/src/libs/engine/events/SetPortValueQueuedEvent.cpp @@ -25,7 +25,7 @@ #include "NodeImpl.hpp" #include "ObjectStore.hpp" #include "AudioBuffer.hpp" -#include "MidiBuffer.hpp" +#include "EventBuffer.hpp" #include "ProcessContext.hpp" namespace Ingen { @@ -111,10 +111,11 @@ SetPortValueQueuedEvent::execute(ProcessContext& context) return; } - MidiBuffer* const mbuf = dynamic_cast(buf); - if (mbuf) { - const double stamp = std::max((double)(_time - context.start()), mbuf->latest_stamp()); - mbuf->append(stamp, _data_size, (const unsigned char*)_data); + EventBuffer* const ebuf = dynamic_cast(buf); + if (ebuf) { + const uint32_t frames = std::max((uint32_t)(_time - context.start()), ebuf->latest_frames()); + // FIXME: type + ebuf->append(frames, 0, 0, _data_size, (const unsigned char*)_data); } } } -- cgit v1.2.1