Properly handle effGet{Input,Output}Properties

Apparently the plugin needs the actual contents of the struct for this
to work.
This commit is contained in:
Robbert van der Helm
2020-03-26 16:24:49 +01:00
parent 0d7a5f10cd
commit cc52c87f34
4 changed files with 62 additions and 21 deletions
+8 -1
View File
@@ -135,6 +135,7 @@ intptr_t send_event(boost::asio::local::stream_protocol::socket& socket,
const std::optional<EventPayload> payload =
data_converter.read(opcode, index, value, data);
if (!payload.has_value()) {
// A 1 usually means that the event was processed succesfully
return 1;
}
@@ -217,7 +218,8 @@ void passthrough_event(boost::asio::local::stream_protocol::socket& socket,
return &events.as_c_events();
},
[&](WantsChunkBuffer&) -> void* { return string_buffer.data(); },
[&](const WantsVstRect&) -> void* { return string_buffer.data(); },
[&](VstIOProperties& props) -> void* { return &props; },
[&](WantsVstRect&) -> void* { return string_buffer.data(); },
[&](const WantsVstTimeInfo&) -> void* { return nullptr; },
[&](WantsString&) -> void* { return string_buffer.data(); }},
event.payload);
@@ -265,6 +267,11 @@ void passthrough_event(boost::asio::local::stream_protocol::socket& socket,
return std::string(*static_cast<char**>(data),
return_value);
},
[&](VstIOProperties& props) -> EventResposnePayload {
// The plugin has written a pointer to a VstRect struct
// into the data poitner
return props;
},
[&](WantsVstRect&) -> EventResposnePayload {
// The plugin has written a pointer to a VstRect struct
// into the data poitner