mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-08 12:30:12 +02:00
Implement IAudioProcessor::getBusArrangement()
This commit is contained in:
@@ -162,6 +162,15 @@ void Vst3Logger::log_request(bool is_host_vst,
|
||||
});
|
||||
}
|
||||
|
||||
void Vst3Logger::log_request(bool is_host_vst,
|
||||
const YaComponent::GetBusArrangement& request) {
|
||||
log_request_base(is_host_vst, [&](auto& message) {
|
||||
message << "<IAudioProcessor* #" << request.instance_id
|
||||
<< ">::getBusArrangement(dir = " << request.dir
|
||||
<< ", index = " << request.index << ", &arr";
|
||||
});
|
||||
}
|
||||
|
||||
void Vst3Logger::log_request(bool is_host_vst,
|
||||
const YaPluginFactory::Construct&) {
|
||||
log_request_base(is_host_vst,
|
||||
@@ -237,6 +246,17 @@ void Vst3Logger::log_response(bool is_host_vst,
|
||||
});
|
||||
}
|
||||
|
||||
void Vst3Logger::log_response(
|
||||
bool is_host_vst,
|
||||
const YaComponent::GetBusArrangementResponse& response) {
|
||||
log_response_base(is_host_vst, [&](auto& message) {
|
||||
message << response.result.string();
|
||||
if (response.result.native() == Steinberg::kResultOk) {
|
||||
message << ", <SpeakerArrangement>";
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
void Vst3Logger::log_response(bool is_host_vst,
|
||||
const YaPluginFactory::ConstructArgs& args) {
|
||||
log_response_base(is_host_vst, [&](auto& message) {
|
||||
|
||||
@@ -69,6 +69,7 @@ class Vst3Logger {
|
||||
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 YaComponent::SetBusArrangements&);
|
||||
void log_request(bool is_host_vst, const YaComponent::GetBusArrangement&);
|
||||
void log_request(bool is_host_vst, const YaPluginFactory::Construct&);
|
||||
void log_request(bool is_host_vst, const YaPluginFactory::SetHostContext&);
|
||||
void log_request(bool is_host_vst, const WantsConfiguration&);
|
||||
@@ -81,6 +82,8 @@ class Vst3Logger {
|
||||
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 YaComponent::GetBusArrangementResponse&);
|
||||
void log_response(bool is_host_vst, const YaPluginFactory::ConstructArgs&);
|
||||
void log_response(bool is_host_vst, const Configuration&);
|
||||
|
||||
|
||||
@@ -70,6 +70,7 @@ using ControlRequest = std::variant<YaComponent::Construct,
|
||||
YaComponent::SetState,
|
||||
YaComponent::GetState,
|
||||
YaComponent::SetBusArrangements,
|
||||
YaComponent::GetBusArrangement,
|
||||
YaPluginFactory::Construct,
|
||||
YaPluginFactory::SetHostContext>;
|
||||
|
||||
|
||||
@@ -457,6 +457,45 @@ class YaComponent : public Steinberg::Vst::IComponent,
|
||||
int32 numIns,
|
||||
Steinberg::Vst::SpeakerArrangement* outputs,
|
||||
int32 numOuts) override = 0;
|
||||
|
||||
/**
|
||||
* The response code and written state for a call to
|
||||
* `IAudioProcessor::getBusArrangement(dir, index, arr)`.
|
||||
*/
|
||||
struct GetBusArrangementResponse {
|
||||
UniversalTResult result;
|
||||
Steinberg::Vst::SpeakerArrangement updated_arr;
|
||||
|
||||
template <typename S>
|
||||
void serialize(S& s) {
|
||||
s.object(result);
|
||||
s.value8b(updated_arr);
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Message to pass through a call to
|
||||
* `IAudioProcessor::getBusArrangement(dir, index, arr)` to the Wine
|
||||
* plugin host.
|
||||
*/
|
||||
struct GetBusArrangement {
|
||||
using Response = GetBusArrangementResponse;
|
||||
|
||||
native_size_t instance_id;
|
||||
|
||||
Steinberg::Vst::BusDirection dir;
|
||||
int32 index;
|
||||
Steinberg::Vst::SpeakerArrangement arr;
|
||||
|
||||
template <typename S>
|
||||
void serialize(S& s) {
|
||||
s.value8b(instance_id);
|
||||
s.value4b(dir);
|
||||
s.value4b(index);
|
||||
s.value8b(arr);
|
||||
}
|
||||
};
|
||||
|
||||
virtual tresult PLUGIN_API
|
||||
getBusArrangement(Steinberg::Vst::BusDirection dir,
|
||||
int32 index,
|
||||
|
||||
Reference in New Issue
Block a user