From cb5287d0379287c461a0ac5b950161244a7fa53b Mon Sep 17 00:00:00 2001 From: David Robillard Date: Mon, 11 May 2009 19:31:17 +0000 Subject: Fix subpatch MIDI IO. Fixes tickets #323 and #332. git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@1974 a436a847-0d15-0410-975c-d299462d15a1 --- src/engine/EventBuffer.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/engine/EventBuffer.cpp') diff --git a/src/engine/EventBuffer.cpp b/src/engine/EventBuffer.cpp index 222aaf31..29291f81 100644 --- a/src/engine/EventBuffer.cpp +++ b/src/engine/EventBuffer.cpp @@ -96,12 +96,14 @@ EventBuffer::copy(const Buffer* src_buf, size_t start_sample, size_t end_sample) const EventBuffer* src = dynamic_cast(src_buf); assert(src); assert(_buf->capacity() >= src->_buf->capacity()); + assert(src->_buf != _buf); - clear(); + //clear(); src->rewind(); memcpy(_buf, src->_buf, src->_buf->size()); _this_nframes = end_sample - start_sample; + assert(event_count() == src->event_count()); } -- cgit v1.2.1