mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-06-17 00:43:56 +02:00
Reorder arguments
This commit is contained in:
+19
-19
@@ -202,25 +202,25 @@ void passthrough_event(boost::asio::local::stream_protocol::socket& socket,
|
|||||||
// because it was not zeroed out by the host) for an event that should
|
// because it was not zeroed out by the host) for an event that should
|
||||||
// report some data back?
|
// report some data back?
|
||||||
const auto response_data = std::visit(
|
const auto response_data = std::visit(
|
||||||
overload{
|
overload{[&](auto) -> EventResposnePayload { return std::monostate(); },
|
||||||
[&](WantsChunkBuffer&) -> EventResposnePayload {
|
[&](WantsChunkBuffer&) -> EventResposnePayload {
|
||||||
// In this case the plugin will have written its data stored in
|
// In this case the plugin will have written its data
|
||||||
// an array to which a pointer is stored in `data`, with the
|
// stored in an array to which a pointer is stored in
|
||||||
// return value from the event determines how much data the
|
// `data`, with the return value from the event determines
|
||||||
// plugin has written
|
// how much data the plugin has written
|
||||||
return std::string(*static_cast<char**>(data), return_value);
|
return std::string(*static_cast<char**>(data),
|
||||||
},
|
return_value);
|
||||||
[&](WantsVstTimeInfo&) -> EventResposnePayload {
|
},
|
||||||
// Not sure why the VST API has twenty different ways of
|
[&](WantsVstTimeInfo&) -> EventResposnePayload {
|
||||||
// returning structs, but in this case the value returned from
|
// Not sure why the VST API has twenty different ways of
|
||||||
// the callback function is actually a pointer to a
|
// returning structs, but in this case the value returned
|
||||||
// `VstTimeInfo` struct!
|
// from the callback function is actually a pointer to a
|
||||||
return *reinterpret_cast<const VstTimeInfo*>(return_value);
|
// `VstTimeInfo` struct!
|
||||||
},
|
return *reinterpret_cast<const VstTimeInfo*>(return_value);
|
||||||
[&](WantsString&) -> EventResposnePayload {
|
},
|
||||||
return std::string(static_cast<char*>(data));
|
[&](WantsString&) -> EventResposnePayload {
|
||||||
},
|
return std::string(static_cast<char*>(data));
|
||||||
[&](auto) -> EventResposnePayload { return std::monostate(); }},
|
}},
|
||||||
event.payload);
|
event.payload);
|
||||||
|
|
||||||
if (logging.has_value()) {
|
if (logging.has_value()) {
|
||||||
|
|||||||
Reference in New Issue
Block a user