13
0

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

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;