diff --git a/src/common/communication.h b/src/common/communication.h index 7cf38b29..063e1d81 100644 --- a/src/common/communication.h +++ b/src/common/communication.h @@ -27,7 +27,7 @@ * in one of the dispatch functions. This is used as a buffer size and also as a * cutoff for checking if c-style strings behind a `char*` have changed. */ -constexpr size_t max_string_size = 128; +constexpr size_t max_string_length = 128; /** * An event as dispatched by the VST host. These events will get forwarded to @@ -36,7 +36,7 @@ constexpr size_t max_string_size = 128; */ struct Event { int32_t opcode; - int32_t parameter; + int32_t index; // TODO: This is an intptr_t, is this actually a poitner that should be // dereferenced? intptr_t value; @@ -49,7 +49,7 @@ struct Event { */ std::optional data; - MSGPACK_DEFINE(opcode, parameter, value, option, data) + MSGPACK_DEFINE(opcode, index, value, option, data) }; /** diff --git a/src/plugin/bridge.cpp b/src/plugin/bridge.cpp index 7447c4fb..92b065eb 100644 --- a/src/plugin/bridge.cpp +++ b/src/plugin/bridge.cpp @@ -74,7 +74,7 @@ Bridge::Bridge() */ intptr_t Bridge::dispatch(AEffect* /*plugin*/, int32_t opcode, - int32_t parameter, + int32_t index, intptr_t value, void* data, float option) { @@ -102,7 +102,7 @@ intptr_t Bridge::dispatch(AEffect* /*plugin*/, ? std::nullopt : std::make_optional(std::string(static_cast(data))); - const Event event{opcode, parameter, value, option, payload}; + const Event event{opcode, index, value, option, payload}; write_object(host_vst_dispatch, event); const auto response = read_object(host_vst_dispatch); diff --git a/src/plugin/bridge.h b/src/plugin/bridge.h index c46cb35c..dbdcaaca 100644 --- a/src/plugin/bridge.h +++ b/src/plugin/bridge.h @@ -50,7 +50,7 @@ class Bridge { */ intptr_t dispatch(AEffect* plugin, int32_t opcode, - int32_t parameter, + int32_t index, intptr_t value, void* data, float option); diff --git a/src/plugin/plugin.cpp b/src/plugin/plugin.cpp index f4cedc8e..0c541b1f 100644 --- a/src/plugin/plugin.cpp +++ b/src/plugin/plugin.cpp @@ -93,12 +93,12 @@ VST_EXPORT AEffect* VSTPluginMain(audioMasterCallback /*audioMaster*/) { intptr_t dispatch(AEffect* plugin, int32_t opcode, - int32_t parameter, + int32_t index, intptr_t value, void* data, float option) { - return get_bridge_instance(*plugin).dispatch(plugin, opcode, parameter, - value, data, option); + return get_bridge_instance(*plugin).dispatch(plugin, opcode, index, value, + data, option); } void process(AEffect* plugin, diff --git a/src/wine-host/vst-host.cpp b/src/wine-host/vst-host.cpp index 3fd539ec..d4e40200 100644 --- a/src/wine-host/vst-host.cpp +++ b/src/wine-host/vst-host.cpp @@ -79,7 +79,7 @@ int main(int argc, char* argv[]) { // TODO: Remove debug, we're just reporting the plugin's name we retrieved // above - std::array buffer; + std::array buffer; while (true) { auto event = read_object(host_vst_dispatch); @@ -100,8 +100,8 @@ int main(int argc, char* argv[]) { } const intptr_t return_value = - plugin->dispatcher(plugin, event.opcode, event.option, - event.parameter, payload, event.option); + plugin->dispatcher(plugin, event.opcode, event.option, event.index, + payload, event.option); // Only write back the value from `payload` if we were passed an empty // buffer to write into @@ -120,7 +120,7 @@ int main(int argc, char* argv[]) { // TODO: Placeholder intptr_t VST_CALL_CONV host_callback(AEffect* plugin, int32_t opcode, - int32_t parameter, + int32_t index, intptr_t value, void* data, float option) {