projects
/
ardour.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
lua MidiBuffer bindings
[ardour.git]
/
libs
/
ardour
/
midi_buffer.cc
diff --git
a/libs/ardour/midi_buffer.cc
b/libs/ardour/midi_buffer.cc
index 3a03a03f9ee5b48545386b33be297664a5b00100..41d638dc781fc84d221849bbefc5405344a3e1fc 100644
(file)
--- a/
libs/ardour/midi_buffer.cc
+++ b/
libs/ardour/midi_buffer.cc
@@
-80,6
+80,14
@@
MidiBuffer::copy(const MidiBuffer& copy)
memcpy(_data, copy._data, copy._size);
}
memcpy(_data, copy._data, copy._size);
}
+void
+MidiBuffer::copy(MidiBuffer const * const copy)
+{
+ assert(_capacity >= copy->size ());
+ _size = copy->size ();
+ memcpy(_data, copy->data(), _size);
+}
+
/** Read events from @a src starting at time @a offset into the START of this buffer, for
* time duration @a nframes. Relative time, where 0 = start of buffer.
/** Read events from @a src starting at time @a offset into the START of this buffer, for
* time duration @a nframes. Relative time, where 0 = start of buffer.