avoid heap allocation by std::vector in realtime context

This commit is contained in:
Paul Davis 2024-04-01 14:59:55 -06:00
parent e29ac27c59
commit b96d556451
1 changed files with 1 additions and 1 deletions

View File

@ -1856,7 +1856,7 @@ LV2Plugin::write_to(RingBuffer<uint8_t>* dest,
return false;
}
vector<uint8_t> buf(buf_size);
uint8_t buf[buf_size];
UIMessage* msg = (UIMessage*)&buf[0];
msg->index = index;
msg->protocol = protocol;