lua MidiBuffer bindings
[ardour.git] / libs / ardour / midi_buffer.cc
index 3a03a03f9ee5b48545386b33be297664a5b00100..41d638dc781fc84d221849bbefc5405344a3e1fc 100644 (file)
@@ -80,6 +80,14 @@ MidiBuffer::copy(const MidiBuffer& copy)
        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.