diff --git a/src/common/logging/vst3.cpp b/src/common/logging/vst3.cpp index 8f05a45a..2f42d3bb 100644 --- a/src/common/logging/vst3.cpp +++ b/src/common/logging/vst3.cpp @@ -1720,7 +1720,7 @@ void Vst3Logger::log_response( if (response.result == Steinberg::kResultOk) { message << ", ( - response.updated_arr) + response.arr) << ">"; } }); diff --git a/src/common/serialization/vst3/plugin/audio-processor.h b/src/common/serialization/vst3/plugin/audio-processor.h index d504dc14..2e16363a 100644 --- a/src/common/serialization/vst3/plugin/audio-processor.h +++ b/src/common/serialization/vst3/plugin/audio-processor.h @@ -97,22 +97,22 @@ class YaAudioProcessor : public Steinberg::Vst::IAudioProcessor { /** * The response code and written state for a call to - * `IAudioProcessor::getBusArrangement(dir, index, arr)`. + * `IAudioProcessor::getBusArrangement(dir, index, &arr)`. */ struct GetBusArrangementResponse { UniversalTResult result; - Steinberg::Vst::SpeakerArrangement updated_arr; + Steinberg::Vst::SpeakerArrangement arr; template void serialize(S& s) { s.object(result); - s.value8b(updated_arr); + s.value8b(arr); } }; /** * Message to pass through a call to - * `IAudioProcessor::getBusArrangement(dir, index, arr)` to the Wine + * `IAudioProcessor::getBusArrangement(dir, index, &arr)` to the Wine * plugin host. */ struct GetBusArrangement { @@ -122,14 +122,12 @@ class YaAudioProcessor : public Steinberg::Vst::IAudioProcessor { Steinberg::Vst::BusDirection dir; int32 index; - Steinberg::Vst::SpeakerArrangement arr; template void serialize(S& s) { s.value8b(instance_id); s.value4b(dir); s.value4b(index); - s.value8b(arr); } }; diff --git a/src/plugin/bridges/vst3-impls/plugin-proxy.cpp b/src/plugin/bridges/vst3-impls/plugin-proxy.cpp index 77c0bfe0..f7583c96 100644 --- a/src/plugin/bridges/vst3-impls/plugin-proxy.cpp +++ b/src/plugin/bridges/vst3-impls/plugin-proxy.cpp @@ -110,13 +110,10 @@ tresult PLUGIN_API Vst3PluginProxyImpl::getBusArrangement( int32 index, Steinberg::Vst::SpeakerArrangement& arr) { const GetBusArrangementResponse response = - bridge.send_audio_processor_message( - YaAudioProcessor::GetBusArrangement{.instance_id = instance_id(), - .dir = dir, - .index = index, - .arr = arr}); + bridge.send_audio_processor_message(YaAudioProcessor::GetBusArrangement{ + .instance_id = instance_id(), .dir = dir, .index = index}); - arr = response.updated_arr; + arr = response.arr; return response.result; } diff --git a/src/wine-host/bridges/vst3.cpp b/src/wine-host/bridges/vst3.cpp index b8073f1b..e0a0eebf 100644 --- a/src/wine-host/bridges/vst3.cpp +++ b/src/wine-host/bridges/vst3.cpp @@ -1128,13 +1128,14 @@ size_t Vst3Bridge::register_object_instance( }, [&](YaAudioProcessor::GetBusArrangement& request) -> YaAudioProcessor::GetBusArrangement::Response { + Steinberg::Vst::SpeakerArrangement arr{}; const tresult result = object_instances[request.instance_id] .audio_processor->getBusArrangement( - request.dir, request.index, request.arr); + request.dir, request.index, arr); return YaAudioProcessor::GetBusArrangementResponse{ - .result = result, .updated_arr = request.arr}; + .result = result, .arr = arr}; }, [&](const YaAudioProcessor::CanProcessSampleSize& request) -> YaAudioProcessor::CanProcessSampleSize::Response {