Serialize midi events using vectors

Easier than to implement C-style arrays in Bitsery and this way we also
don't have to worry about cleanup.

Serum still segfaults with multiple events so something is still off.
This commit is contained in:
Robbert van der Helm
2020-03-09 15:30:45 +01:00
parent be11364c58
commit 69008e97a4
6 changed files with 111 additions and 32 deletions
+2 -1
View File
@@ -31,7 +31,8 @@ intptr_t send_event(boost::asio::local::stream_protocol::socket& socket,
// There are some events that need specific structs that we can't simply
// serialize as a string because they might contain null bytes
if (is_dispatch && opcode == effProcessEvents) {
payload = *static_cast<VstEvents*>(data);
// Move the elements into a vector for easier serialization
payload = DynamicVstEvents(*static_cast<VstEvents*>(data));
} else {
// TODO: More of these structs