mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-10 04:30:12 +02:00
Don't serialize input info for IComponent::getBusInfo
This commit is contained in:
@@ -1787,10 +1787,10 @@ void Vst3Logger::log_response(bool is_host_vst,
|
|||||||
message << response.result.string();
|
message << response.result.string();
|
||||||
if (response.result == Steinberg::kResultOk) {
|
if (response.result == Steinberg::kResultOk) {
|
||||||
message << ", <BusInfo for \""
|
message << ", <BusInfo for \""
|
||||||
<< VST3::StringConvert::convert(response.updated_bus.name)
|
<< VST3::StringConvert::convert(response.bus.name)
|
||||||
<< "\" with " << response.updated_bus.channelCount
|
<< "\" with " << response.bus.channelCount
|
||||||
<< " channels, type = " << response.updated_bus.busType
|
<< " channels, type = " << response.bus.busType
|
||||||
<< ", flags = " << response.updated_bus.flags << ">";
|
<< ", flags = " << response.bus.flags << ">";
|
||||||
if (from_cache) {
|
if (from_cache) {
|
||||||
message << " (from cache)";
|
message << " (from cache)";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -151,12 +151,12 @@ class YaComponent : public Steinberg::Vst::IComponent {
|
|||||||
*/
|
*/
|
||||||
struct GetBusInfoResponse {
|
struct GetBusInfoResponse {
|
||||||
UniversalTResult result;
|
UniversalTResult result;
|
||||||
Steinberg::Vst::BusInfo updated_bus;
|
Steinberg::Vst::BusInfo bus;
|
||||||
|
|
||||||
template <typename S>
|
template <typename S>
|
||||||
void serialize(S& s) {
|
void serialize(S& s) {
|
||||||
s.object(result);
|
s.object(result);
|
||||||
s.object(updated_bus);
|
s.object(bus);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -172,14 +172,12 @@ class YaComponent : public Steinberg::Vst::IComponent {
|
|||||||
Steinberg::Vst::BusType type;
|
Steinberg::Vst::BusType type;
|
||||||
Steinberg::Vst::BusDirection dir;
|
Steinberg::Vst::BusDirection dir;
|
||||||
int32 index;
|
int32 index;
|
||||||
Steinberg::Vst::BusInfo bus;
|
|
||||||
|
|
||||||
template <typename S>
|
template <typename S>
|
||||||
void serialize(S& s) {
|
void serialize(S& s) {
|
||||||
s.value8b(instance_id);
|
s.value8b(instance_id);
|
||||||
s.value4b(type);
|
s.value4b(type);
|
||||||
s.value4b(dir);
|
s.value4b(dir);
|
||||||
s.object(bus);
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -260,11 +260,8 @@ Vst3PluginProxyImpl::getBusInfo(Steinberg::Vst::MediaType type,
|
|||||||
Steinberg::Vst::BusDirection dir,
|
Steinberg::Vst::BusDirection dir,
|
||||||
int32 index,
|
int32 index,
|
||||||
Steinberg::Vst::BusInfo& bus /*out*/) {
|
Steinberg::Vst::BusInfo& bus /*out*/) {
|
||||||
const auto request = YaComponent::GetBusInfo{.instance_id = instance_id(),
|
const auto request = YaComponent::GetBusInfo{
|
||||||
.type = type,
|
.instance_id = instance_id(), .type = type, .dir = dir, .index = index};
|
||||||
.dir = dir,
|
|
||||||
.index = index,
|
|
||||||
.bus = bus};
|
|
||||||
|
|
||||||
// During processing we'll cache this info to work around an implementation
|
// During processing we'll cache this info to work around an implementation
|
||||||
// issue in REAPER
|
// issue in REAPER
|
||||||
@@ -281,8 +278,7 @@ Vst3PluginProxyImpl::getBusInfo(Steinberg::Vst::MediaType type,
|
|||||||
bridge.logger.log_response(
|
bridge.logger.log_response(
|
||||||
true,
|
true,
|
||||||
YaComponent::GetBusInfo::Response{
|
YaComponent::GetBusInfo::Response{
|
||||||
.result = Steinberg::kResultOk,
|
.result = Steinberg::kResultOk, .bus = it->second},
|
||||||
.updated_bus = it->second},
|
|
||||||
true);
|
true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -296,12 +292,12 @@ Vst3PluginProxyImpl::getBusInfo(Steinberg::Vst::MediaType type,
|
|||||||
const GetBusInfoResponse response =
|
const GetBusInfoResponse response =
|
||||||
bridge.send_audio_processor_message(request);
|
bridge.send_audio_processor_message(request);
|
||||||
|
|
||||||
bus = response.updated_bus;
|
bus = response.bus;
|
||||||
|
|
||||||
{
|
{
|
||||||
std::lock_guard lock(processing_bus_cache_mutex);
|
std::lock_guard lock(processing_bus_cache_mutex);
|
||||||
if (processing_bus_cache) {
|
if (processing_bus_cache) {
|
||||||
processing_bus_cache->bus_info[args] = response.updated_bus;
|
processing_bus_cache->bus_info[args] = response.bus;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1204,14 +1204,15 @@ size_t Vst3Bridge::register_object_instance(
|
|||||||
},
|
},
|
||||||
[&](YaComponent::GetBusInfo& request)
|
[&](YaComponent::GetBusInfo& request)
|
||||||
-> YaComponent::GetBusInfo::Response {
|
-> YaComponent::GetBusInfo::Response {
|
||||||
|
Steinberg::Vst::BusInfo bus{};
|
||||||
const tresult result =
|
const tresult result =
|
||||||
object_instances[request.instance_id]
|
object_instances[request.instance_id]
|
||||||
.component->getBusInfo(
|
.component->getBusInfo(request.type,
|
||||||
request.type, request.dir, request.index,
|
request.dir,
|
||||||
request.bus);
|
request.index, bus);
|
||||||
|
|
||||||
return YaComponent::GetBusInfoResponse{
|
return YaComponent::GetBusInfoResponse{
|
||||||
.result = result, .updated_bus = request.bus};
|
.result = result, .bus = std::move(bus)};
|
||||||
},
|
},
|
||||||
[&](YaComponent::GetRoutingInfo& request)
|
[&](YaComponent::GetRoutingInfo& request)
|
||||||
-> YaComponent::GetRoutingInfo::Response {
|
-> YaComponent::GetRoutingInfo::Response {
|
||||||
|
|||||||
Reference in New Issue
Block a user