From 3d89115a67a9c947a28539ffdd2399808a53279b Mon Sep 17 00:00:00 2001 From: David Robillard Date: Mon, 16 Nov 2009 00:30:35 +0000 Subject: Rework objects extension to have "value ports" and "message ports". Make audio and control buffers in ingen actually object buffers (towards interop). Overhaul the hell out of ingen buffer and mixing stuff. git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@2266 a436a847-0d15-0410-975c-d299462d15a1 --- src/engine/EventBuffer.cpp | 38 ++++++++------------------------------ 1 file changed, 8 insertions(+), 30 deletions(-) (limited to 'src/engine/EventBuffer.cpp') diff --git a/src/engine/EventBuffer.cpp b/src/engine/EventBuffer.cpp index d92ecae1..380fe3b6 100644 --- a/src/engine/EventBuffer.cpp +++ b/src/engine/EventBuffer.cpp @@ -35,39 +35,11 @@ using namespace Shared; */ EventBuffer::EventBuffer(size_t capacity) : Buffer(DataType(DataType::EVENTS), capacity) - , _local_buf(new LV2EventBuffer(capacity)) + , _buf(new LV2EventBuffer(capacity)) { - _buf = _local_buf; clear(); - //cerr << "Creating MIDI Buffer " << _buf << ", capacity = " << _buf->capacity << endl; -} - - -/** Use another buffer's data instead of the local one. - * - * This buffer will essentially be identical to @a buf after this call. - */ -bool -EventBuffer::join(Buffer* buf) -{ - assert(buf != this); - EventBuffer* ebuf = dynamic_cast(buf); - if (!ebuf) - return false; - - _buf = ebuf->_local_buf; - _joined_buf = ebuf; - - return true; -} - - -void -EventBuffer::unjoin() -{ - _joined_buf = NULL; - _buf = _local_buf; + //cerr << "Creating Event Buffer " << _buf << ", capacity = " << _buf->capacity << endl; } @@ -101,6 +73,12 @@ EventBuffer::copy(Context& context, const Buffer* src_buf) } +void +EventBuffer::mix(Context& context, const Buffer* src) +{ +} + + /** Clear, and merge \a a and \a b into this buffer. * * FIXME: This is slow. -- cgit v1.2.1