add ::shift() to RTMidiBuffer to allow shifting time origin of events

This commit is contained in:
Paul Davis 2021-10-27 22:51:25 -06:00
parent e1c874b299
commit 282707ee32

View File

@ -95,6 +95,15 @@ class LIBARDOUR_API RTMidiBuffer : public Evoral::EventSink<samplepos_t>
}
}
void shift (sampleoffset_t distance) {
if (_size == 0) {
return;
}
for (size_t n = 0; n < _size; ++n) {
_data[n].timestamp += distance;
}
}
private:
friend struct WriteProtectRender;