diff options
author | David Robillard <d@drobilla.net> | 2009-11-16 00:30:35 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2009-11-16 00:30:35 +0000 |
commit | 3d89115a67a9c947a28539ffdd2399808a53279b (patch) | |
tree | 826b900de3979eed9c31aae0d3ac560d39b53460 /src/engine/EventBuffer.cpp | |
parent | 597fa9212f27d2448c0cdd20fbf616928c662cc1 (diff) | |
download | ingen-3d89115a67a9c947a28539ffdd2399808a53279b.tar.gz ingen-3d89115a67a9c947a28539ffdd2399808a53279b.tar.bz2 ingen-3d89115a67a9c947a28539ffdd2399808a53279b.zip |
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
Diffstat (limited to 'src/engine/EventBuffer.cpp')
-rw-r--r-- | src/engine/EventBuffer.cpp | 38 |
1 files changed, 8 insertions, 30 deletions
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<EventBuffer*>(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. |