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
+3 -1
View File
@@ -181,7 +181,9 @@ void passthrough_event(boost::asio::local::stream_protocol::socket& socket,
return const_cast<char*>(s.c_str());
},
// TODO: Check if the deserialization leaks memory
[&](VstEvents& events) -> void* { return &events; },
[&](DynamicVstEvents& events) -> void* {
return &events.as_c_events();
},
[&](NeedsBuffer&) -> void* { return buffer.data(); }},
event.payload);
const intptr_t return_value = callback(plugin, event.opcode, event.index,