Fix note events copy
This commit is contained in:
parent
25370e82bc
commit
86d82060ad
1 changed files with 2 additions and 1 deletions
|
|
@ -5,6 +5,7 @@
|
||||||
// If not, contact the sfizz maintainers at https://github.com/sfztools/sfizz
|
// If not, contact the sfizz maintainers at https://github.com/sfztools/sfizz
|
||||||
|
|
||||||
#include "SfizzVstUpdates.h"
|
#include "SfizzVstUpdates.h"
|
||||||
|
#include <algorithm>
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
|
|
||||||
OSCUpdate::~OSCUpdate()
|
OSCUpdate::~OSCUpdate()
|
||||||
|
|
@ -57,7 +58,7 @@ void NoteUpdate::setEvents(const std::pair<uint32_t, float>* events, uint32_t co
|
||||||
|
|
||||||
if (copy) {
|
if (copy) {
|
||||||
auto *buffer = new std::pair<uint32_t, float>[count];
|
auto *buffer = new std::pair<uint32_t, float>[count];
|
||||||
std::memcpy(buffer, events, count);
|
std::copy_n(events, count, buffer);
|
||||||
events = buffer;
|
events = buffer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue