mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-09 20:29:10 +02:00
Don't serialize input arrangement for IAudioProcessor::getBusArrangement
This commit is contained in:
@@ -1720,7 +1720,7 @@ void Vst3Logger::log_response(
|
|||||||
if (response.result == Steinberg::kResultOk) {
|
if (response.result == Steinberg::kResultOk) {
|
||||||
message << ", <SpeakerArrangement: 0b"
|
message << ", <SpeakerArrangement: 0b"
|
||||||
<< std::bitset<sizeof(Steinberg::Vst::SpeakerArrangement)>(
|
<< std::bitset<sizeof(Steinberg::Vst::SpeakerArrangement)>(
|
||||||
response.updated_arr)
|
response.arr)
|
||||||
<< ">";
|
<< ">";
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -97,22 +97,22 @@ class YaAudioProcessor : public Steinberg::Vst::IAudioProcessor {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* The response code and written state for a call to
|
* The response code and written state for a call to
|
||||||
* `IAudioProcessor::getBusArrangement(dir, index, arr)`.
|
* `IAudioProcessor::getBusArrangement(dir, index, &arr)`.
|
||||||
*/
|
*/
|
||||||
struct GetBusArrangementResponse {
|
struct GetBusArrangementResponse {
|
||||||
UniversalTResult result;
|
UniversalTResult result;
|
||||||
Steinberg::Vst::SpeakerArrangement updated_arr;
|
Steinberg::Vst::SpeakerArrangement arr;
|
||||||
|
|
||||||
template <typename S>
|
template <typename S>
|
||||||
void serialize(S& s) {
|
void serialize(S& s) {
|
||||||
s.object(result);
|
s.object(result);
|
||||||
s.value8b(updated_arr);
|
s.value8b(arr);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Message to pass through a call to
|
* 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.
|
* plugin host.
|
||||||
*/
|
*/
|
||||||
struct GetBusArrangement {
|
struct GetBusArrangement {
|
||||||
@@ -122,14 +122,12 @@ class YaAudioProcessor : public Steinberg::Vst::IAudioProcessor {
|
|||||||
|
|
||||||
Steinberg::Vst::BusDirection dir;
|
Steinberg::Vst::BusDirection dir;
|
||||||
int32 index;
|
int32 index;
|
||||||
Steinberg::Vst::SpeakerArrangement arr;
|
|
||||||
|
|
||||||
template <typename S>
|
template <typename S>
|
||||||
void serialize(S& s) {
|
void serialize(S& s) {
|
||||||
s.value8b(instance_id);
|
s.value8b(instance_id);
|
||||||
s.value4b(dir);
|
s.value4b(dir);
|
||||||
s.value4b(index);
|
s.value4b(index);
|
||||||
s.value8b(arr);
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -110,13 +110,10 @@ tresult PLUGIN_API Vst3PluginProxyImpl::getBusArrangement(
|
|||||||
int32 index,
|
int32 index,
|
||||||
Steinberg::Vst::SpeakerArrangement& arr) {
|
Steinberg::Vst::SpeakerArrangement& arr) {
|
||||||
const GetBusArrangementResponse response =
|
const GetBusArrangementResponse response =
|
||||||
bridge.send_audio_processor_message(
|
bridge.send_audio_processor_message(YaAudioProcessor::GetBusArrangement{
|
||||||
YaAudioProcessor::GetBusArrangement{.instance_id = instance_id(),
|
.instance_id = instance_id(), .dir = dir, .index = index});
|
||||||
.dir = dir,
|
|
||||||
.index = index,
|
|
||||||
.arr = arr});
|
|
||||||
|
|
||||||
arr = response.updated_arr;
|
arr = response.arr;
|
||||||
|
|
||||||
return response.result;
|
return response.result;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1128,13 +1128,14 @@ size_t Vst3Bridge::register_object_instance(
|
|||||||
},
|
},
|
||||||
[&](YaAudioProcessor::GetBusArrangement& request)
|
[&](YaAudioProcessor::GetBusArrangement& request)
|
||||||
-> YaAudioProcessor::GetBusArrangement::Response {
|
-> YaAudioProcessor::GetBusArrangement::Response {
|
||||||
|
Steinberg::Vst::SpeakerArrangement arr{};
|
||||||
const tresult result =
|
const tresult result =
|
||||||
object_instances[request.instance_id]
|
object_instances[request.instance_id]
|
||||||
.audio_processor->getBusArrangement(
|
.audio_processor->getBusArrangement(
|
||||||
request.dir, request.index, request.arr);
|
request.dir, request.index, arr);
|
||||||
|
|
||||||
return YaAudioProcessor::GetBusArrangementResponse{
|
return YaAudioProcessor::GetBusArrangementResponse{
|
||||||
.result = result, .updated_arr = request.arr};
|
.result = result, .arr = arr};
|
||||||
},
|
},
|
||||||
[&](const YaAudioProcessor::CanProcessSampleSize& request)
|
[&](const YaAudioProcessor::CanProcessSampleSize& request)
|
||||||
-> YaAudioProcessor::CanProcessSampleSize::Response {
|
-> YaAudioProcessor::CanProcessSampleSize::Response {
|
||||||
|
|||||||
Reference in New Issue
Block a user