summaryrefslogtreecommitdiffstats
path: root/src/engine/EventBuffer.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2009-06-02 23:24:28 +0000
committerDavid Robillard <d@drobilla.net>2009-06-02 23:24:28 +0000
commit49c05a2653e2f6c8abd8390a5e1f07361cd66f33 (patch)
tree487210029e9367fee2d5c88c7ea3ecb1ac33bd12 /src/engine/EventBuffer.cpp
parenta9f1f6912fa3e6b485a5c6e4195233ef3fb087a1 (diff)
downloadingen-49c05a2653e2f6c8abd8390a5e1f07361cd66f33.tar.gz
ingen-49c05a2653e2f6c8abd8390a5e1f07361cd66f33.tar.bz2
ingen-49c05a2653e2f6c8abd8390a5e1f07361cd66f33.zip
Fix horribly broken LV2 event implementation (ticket #378 among other problems).
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@2061 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/engine/EventBuffer.cpp')
-rw-r--r--src/engine/EventBuffer.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/engine/EventBuffer.cpp b/src/engine/EventBuffer.cpp
index 7110ccc2..5e3e8b4a 100644
--- a/src/engine/EventBuffer.cpp
+++ b/src/engine/EventBuffer.cpp
@@ -50,6 +50,7 @@ EventBuffer::EventBuffer(size_t capacity)
bool
EventBuffer::join(Buffer* buf)
{
+ assert(buf != this);
EventBuffer* ebuf = dynamic_cast<EventBuffer*>(buf);
if (!ebuf)
return false;
@@ -90,12 +91,12 @@ EventBuffer::copy(const Buffer* src_buf, size_t start_sample, size_t end_sample)
const EventBuffer* src = dynamic_cast<const EventBuffer*>(src_buf);
assert(src);
assert(_buf->capacity() >= src->_buf->capacity());
+ assert(src != this);
assert(src->_buf != _buf);
- //clear();
src->rewind();
- memcpy(_buf, src->_buf, src->_buf->size());
+ _buf->copy(*src->_buf);
_this_nframes = end_sample - start_sample;
assert(event_count() == src->event_count());
}