mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-07 03:50:11 +02:00
Don't serialize input output info for IComponent::getRoutingInfo
Yes, input output info.
This commit is contained in:
@@ -1086,9 +1086,7 @@ bool Vst3Logger::log_request(bool is_host_vst,
|
||||
<< request.instance_id
|
||||
<< ": IComponent::getRoutingInfo(inInfo = <RoutingInfo& for bus "
|
||||
<< request.in_info.busIndex << " and channel "
|
||||
<< request.in_info.channel << ">, outInfo = <RoutingInfo& for bus "
|
||||
<< request.out_info.busIndex << " and channel "
|
||||
<< request.out_info.channel << ">)";
|
||||
<< request.in_info.channel << ">, &outInfo)";
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1804,12 +1802,8 @@ void Vst3Logger::log_response(
|
||||
log_response_base(is_host_vst, [&](auto& message) {
|
||||
message << response.result.string();
|
||||
if (response.result == Steinberg::kResultOk) {
|
||||
message << ", <RoutingInfo& for bus "
|
||||
<< response.updated_in_info.busIndex << " and channel "
|
||||
<< response.updated_in_info.channel
|
||||
<< ", <RoutingInfo& for bus "
|
||||
<< response.updated_out_info.busIndex << " and channel "
|
||||
<< response.updated_out_info.channel << ">";
|
||||
message << ", <RoutingInfo& for bus " << response.out_info.busIndex
|
||||
<< " and channel " << response.out_info.channel << ">";
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -30,9 +30,6 @@
|
||||
* part of `Vst3PluginProxy`. Event though `IComponent` inherits from
|
||||
* `IPlguinBase`, we'll implement that separately in `YaPluginBase` because
|
||||
* `IEditController` also inherits from `IPluginBase`.
|
||||
*
|
||||
* TODO: Remove the original fields for out parameters in the structs. They're
|
||||
* really supposed to be empty.
|
||||
*/
|
||||
class YaComponent : public Steinberg::Vst::IComponent {
|
||||
public:
|
||||
@@ -147,7 +144,7 @@ class YaComponent : public Steinberg::Vst::IComponent {
|
||||
|
||||
/**
|
||||
* The response code and returned bus information for a call to
|
||||
* `IComponent::getBusInfo(type, dir, index, bus <out>)`.
|
||||
* `IComponent::getBusInfo(type, dir, index, &bus)`.
|
||||
*/
|
||||
struct GetBusInfoResponse {
|
||||
UniversalTResult result;
|
||||
@@ -162,7 +159,7 @@ class YaComponent : public Steinberg::Vst::IComponent {
|
||||
|
||||
/**
|
||||
* Message to pass through a call to `IComponent::getBusInfo(type, dir,
|
||||
* index, bus <out>)` to the Wine plugin host.
|
||||
* index, &bus)` to the Wine plugin host.
|
||||
*/
|
||||
struct GetBusInfo {
|
||||
using Response = GetBusInfoResponse;
|
||||
@@ -189,24 +186,22 @@ class YaComponent : public Steinberg::Vst::IComponent {
|
||||
|
||||
/**
|
||||
* The response code and returned routing information for a call to
|
||||
* `IComponent::getRoutingInfo(in_info, out_info <out>)`.
|
||||
* `IComponent::getRoutingInfo(in_info, &out_info)`.
|
||||
*/
|
||||
struct GetRoutingInfoResponse {
|
||||
UniversalTResult result;
|
||||
Steinberg::Vst::RoutingInfo updated_in_info;
|
||||
Steinberg::Vst::RoutingInfo updated_out_info;
|
||||
Steinberg::Vst::RoutingInfo out_info;
|
||||
|
||||
template <typename S>
|
||||
void serialize(S& s) {
|
||||
s.object(result);
|
||||
s.object(updated_in_info);
|
||||
s.object(updated_out_info);
|
||||
s.object(out_info);
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Message to pass through a call to `IComponent::getRoutingInfo(in_info,
|
||||
* out_info <out>)` to the Wine plugin host.
|
||||
* &out_info)` to the Wine plugin host.
|
||||
*/
|
||||
struct GetRoutingInfo {
|
||||
using Response = GetRoutingInfoResponse;
|
||||
@@ -214,13 +209,11 @@ class YaComponent : public Steinberg::Vst::IComponent {
|
||||
native_size_t instance_id;
|
||||
|
||||
Steinberg::Vst::RoutingInfo in_info;
|
||||
Steinberg::Vst::RoutingInfo out_info;
|
||||
|
||||
template <typename S>
|
||||
void serialize(S& s) {
|
||||
s.value8b(instance_id);
|
||||
s.object(in_info);
|
||||
s.object(out_info);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -307,13 +307,12 @@ Vst3PluginProxyImpl::getBusInfo(Steinberg::Vst::MediaType type,
|
||||
tresult PLUGIN_API Vst3PluginProxyImpl::getRoutingInfo(
|
||||
Steinberg::Vst::RoutingInfo& inInfo,
|
||||
Steinberg::Vst::RoutingInfo& outInfo /*out*/) {
|
||||
const GetRoutingInfoResponse response = bridge.send_audio_processor_message(
|
||||
YaComponent::GetRoutingInfo{.instance_id = instance_id(),
|
||||
.in_info = inInfo,
|
||||
.out_info = outInfo});
|
||||
const GetRoutingInfoResponse response =
|
||||
bridge.send_audio_processor_message(YaComponent::GetRoutingInfo{
|
||||
.instance_id = instance_id(), .in_info = inInfo});
|
||||
|
||||
outInfo = response.out_info;
|
||||
|
||||
inInfo = response.updated_in_info;
|
||||
outInfo = response.updated_out_info;
|
||||
return response.result;
|
||||
}
|
||||
|
||||
|
||||
@@ -1216,15 +1216,14 @@ size_t Vst3Bridge::register_object_instance(
|
||||
},
|
||||
[&](YaComponent::GetRoutingInfo& request)
|
||||
-> YaComponent::GetRoutingInfo::Response {
|
||||
Steinberg::Vst::RoutingInfo out_info{};
|
||||
const tresult result =
|
||||
object_instances[request.instance_id]
|
||||
.component->getRoutingInfo(request.in_info,
|
||||
request.out_info);
|
||||
out_info);
|
||||
|
||||
return YaComponent::GetRoutingInfoResponse{
|
||||
.result = result,
|
||||
.updated_in_info = request.in_info,
|
||||
.updated_out_info = request.out_info};
|
||||
.result = result, .out_info = std::move(out_info)};
|
||||
},
|
||||
[&](const YaComponent::ActivateBus& request)
|
||||
-> YaComponent::ActivateBus::Response {
|
||||
|
||||
Reference in New Issue
Block a user