mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-06-10 14:22:16 +02:00
Unify handling for *::{get,set}State
Since these functions are exactly the same, and for whatever reason they didn't just add them to the `IPluginBase` both `IComponent` and `IEditController`. inherit from
This commit is contained in:
+29
-28
@@ -60,6 +60,23 @@ void Vst3Logger::log_request(bool is_host_vst,
|
||||
});
|
||||
}
|
||||
|
||||
void Vst3Logger::log_request(bool is_host_vst,
|
||||
const Vst3PluginProxy::SetState& request) {
|
||||
log_request_base(is_host_vst, [&](auto& message) {
|
||||
message << "<{IComponent,IEditController}* #" << request.instance_id
|
||||
<< ">::setState(state = <IBStream* containing "
|
||||
<< request.state.size() << "bytes>)";
|
||||
});
|
||||
}
|
||||
|
||||
void Vst3Logger::log_request(bool is_host_vst,
|
||||
const Vst3PluginProxy::GetState& request) {
|
||||
log_request_base(is_host_vst, [&](auto& message) {
|
||||
message << "<{IComponent,IEditController}* #" << request.instance_id
|
||||
<< ">::getState(state = <IBStream*>)";
|
||||
});
|
||||
}
|
||||
|
||||
void Vst3Logger::log_request(
|
||||
bool is_host_vst,
|
||||
const YaAudioProcessor::SetBusArrangements& request) {
|
||||
@@ -247,23 +264,6 @@ void Vst3Logger::log_request(bool is_host_vst,
|
||||
});
|
||||
}
|
||||
|
||||
void Vst3Logger::log_request(bool is_host_vst,
|
||||
const YaComponent::SetState& request) {
|
||||
log_request_base(is_host_vst, [&](auto& message) {
|
||||
message << "<IComponent* #" << request.instance_id
|
||||
<< ">::setState(state = <IBStream* containing "
|
||||
<< request.state.size() << "bytes>)";
|
||||
});
|
||||
}
|
||||
|
||||
void Vst3Logger::log_request(bool is_host_vst,
|
||||
const YaComponent::GetState& request) {
|
||||
log_request_base(is_host_vst, [&](auto& message) {
|
||||
message << "<IComponent* #" << request.instance_id
|
||||
<< ">::getState(state = <IBStream*>)";
|
||||
});
|
||||
}
|
||||
|
||||
void Vst3Logger::log_request(bool is_host_vst,
|
||||
const YaPluginBase::Initialize& request) {
|
||||
log_request_base(is_host_vst, [&](auto& message) {
|
||||
@@ -323,6 +323,18 @@ void Vst3Logger::log_response(bool is_host_vst,
|
||||
});
|
||||
}
|
||||
|
||||
void Vst3Logger::log_response(
|
||||
bool is_host_vst,
|
||||
const Vst3PluginProxy::GetStateResponse& response) {
|
||||
log_response_base(is_host_vst, [&](auto& message) {
|
||||
message << response.result.string();
|
||||
if (response.result == Steinberg::kResultOk) {
|
||||
message << ", <IBStream* containing "
|
||||
<< response.updated_state.size() << " bytes>";
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
void Vst3Logger::log_response(
|
||||
bool is_host_vst,
|
||||
const YaAudioProcessor::GetBusArrangementResponse& response) {
|
||||
@@ -403,17 +415,6 @@ void Vst3Logger::log_response(
|
||||
});
|
||||
}
|
||||
|
||||
void Vst3Logger::log_response(bool is_host_vst,
|
||||
const YaComponent::GetStateResponse& response) {
|
||||
log_response_base(is_host_vst, [&](auto& message) {
|
||||
message << response.result.string();
|
||||
if (response.result == Steinberg::kResultOk) {
|
||||
message << ", <IBStream* containing "
|
||||
<< response.updated_state.size() << " bytes>";
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
void Vst3Logger::log_response(bool is_host_vst,
|
||||
const YaPluginFactory::ConstructArgs& args) {
|
||||
log_response_base(is_host_vst, [&](auto& message) {
|
||||
|
||||
@@ -58,6 +58,8 @@ class Vst3Logger {
|
||||
|
||||
void log_request(bool is_host_vst, const Vst3PluginProxy::Construct&);
|
||||
void log_request(bool is_host_vst, const Vst3PluginProxy::Destruct&);
|
||||
void log_request(bool is_host_vst, const Vst3PluginProxy::SetState&);
|
||||
void log_request(bool is_host_vst, const Vst3PluginProxy::GetState&);
|
||||
void log_request(bool is_host_vst,
|
||||
const YaAudioProcessor::SetBusArrangements&);
|
||||
void log_request(bool is_host_vst,
|
||||
@@ -77,8 +79,6 @@ class Vst3Logger {
|
||||
void log_request(bool is_host_vst, const YaComponent::GetRoutingInfo&);
|
||||
void log_request(bool is_host_vst, const YaComponent::ActivateBus&);
|
||||
void log_request(bool is_host_vst, const YaComponent::SetActive&);
|
||||
void log_request(bool is_host_vst, const YaComponent::SetState&);
|
||||
void log_request(bool is_host_vst, const YaComponent::GetState&);
|
||||
void log_request(bool is_host_vst, const YaPluginBase::Initialize&);
|
||||
void log_request(bool is_host_vst, const YaPluginBase::Terminate&);
|
||||
void log_request(bool is_host_vst, const YaPluginFactory::Construct&);
|
||||
@@ -89,6 +89,8 @@ class Vst3Logger {
|
||||
void log_response(
|
||||
bool is_host_vst,
|
||||
const std::variant<Vst3PluginProxy::ConstructArgs, UniversalTResult>&);
|
||||
void log_response(bool is_host_vst,
|
||||
const Vst3PluginProxy::GetStateResponse&);
|
||||
void log_response(bool is_host_vst,
|
||||
const YaAudioProcessor::GetBusArrangementResponse&);
|
||||
void log_response(bool is_host_vst,
|
||||
@@ -96,7 +98,6 @@ class Vst3Logger {
|
||||
void log_response(bool is_host_vst, const YaComponent::GetBusInfoResponse&);
|
||||
void log_response(bool is_host_vst,
|
||||
const YaComponent::GetRoutingInfoResponse&);
|
||||
void log_response(bool is_host_vst, const YaComponent::GetStateResponse&);
|
||||
void log_response(bool is_host_vst, const YaPluginFactory::ConstructArgs&);
|
||||
void log_response(bool is_host_vst, const Configuration&);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user