mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-07 12:10:09 +02:00
Wrap event result data in an std::variant
Gets a bit more complicated this way, but this avoids having to use string to manually serialize and deserialize arbitrary objects. The new options for `AEffect` and `VstTimeInfo` structs are not yet used.
This commit is contained in:
@@ -187,10 +187,13 @@ class DispatchDataConverter : DefaultDataConverter {
|
||||
// Write the chunk data to some publically accessible place in
|
||||
// `HostBridge` and write a pointer to that struct to the data
|
||||
// pointer
|
||||
assert(response.data.has_value());
|
||||
chunk.assign(response.data->begin(), response.data->end());
|
||||
{
|
||||
std::string buffer =
|
||||
std::get<std::string>(response.payload);
|
||||
chunk.assign(buffer.begin(), buffer.end());
|
||||
|
||||
*static_cast<void**>(data) = chunk.data();
|
||||
*static_cast<void**>(data) = chunk.data();
|
||||
}
|
||||
break;
|
||||
default:
|
||||
DefaultDataConverter::write(opcode, data, response);
|
||||
|
||||
Reference in New Issue
Block a user