mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-06-09 22:02:10 +02:00
Implement IComponent::activateBus()
This commit is contained in:
@@ -114,6 +114,16 @@ void Vst3Logger::log_request(bool is_host_vst,
|
||||
});
|
||||
}
|
||||
|
||||
void Vst3Logger::log_request(bool is_host_vst,
|
||||
const YaComponent::ActivateBus& request) {
|
||||
log_request_base(is_host_vst, [&](auto& message) {
|
||||
message << "<IComponent* #" << request.instance_id
|
||||
<< ">::activateBus(type = " << request.type
|
||||
<< ", dir = " << request.dir << ", index = " << request.index
|
||||
<< ", state = " << (request.state ? "true" : "false") << ">)";
|
||||
});
|
||||
}
|
||||
|
||||
void Vst3Logger::log_request(bool is_host_vst,
|
||||
const YaPluginFactory::Construct&) {
|
||||
log_request_base(is_host_vst,
|
||||
|
||||
@@ -64,6 +64,7 @@ class Vst3Logger {
|
||||
void log_request(bool is_host_vst, const YaComponent::GetBusCount&);
|
||||
void log_request(bool is_host_vst, const YaComponent::GetBusInfo&);
|
||||
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 YaPluginFactory::Construct&);
|
||||
void log_request(bool is_host_vst, const YaPluginFactory::SetHostContext&);
|
||||
void log_request(bool is_host_vst, const WantsConfiguration&);
|
||||
|
||||
@@ -65,6 +65,7 @@ using ControlRequest = std::variant<YaComponent::Construct,
|
||||
YaComponent::GetBusCount,
|
||||
YaComponent::GetBusInfo,
|
||||
YaComponent::GetRoutingInfo,
|
||||
YaComponent::ActivateBus,
|
||||
YaPluginFactory::Construct,
|
||||
YaPluginFactory::SetHostContext>;
|
||||
|
||||
|
||||
@@ -301,6 +301,31 @@ class YaComponent : public Steinberg::Vst::IComponent {
|
||||
virtual tresult PLUGIN_API
|
||||
getRoutingInfo(Steinberg::Vst::RoutingInfo& inInfo,
|
||||
Steinberg::Vst::RoutingInfo& outInfo /*out*/) override = 0;
|
||||
|
||||
/**
|
||||
* Message to pass through a call to `IComponent::activateBus(type, dir,
|
||||
* index, state)` to the Wine plugin host.
|
||||
*/
|
||||
struct ActivateBus {
|
||||
using Response = UniversalTResult;
|
||||
|
||||
native_size_t instance_id;
|
||||
|
||||
Steinberg::Vst::MediaType type;
|
||||
Steinberg::Vst::BusDirection dir;
|
||||
int32 index;
|
||||
TBool state;
|
||||
|
||||
template <typename S>
|
||||
void serialize(S& s) {
|
||||
s.value8b(instance_id);
|
||||
s.value4b(type);
|
||||
s.value4b(dir);
|
||||
s.value4b(index);
|
||||
s.value1b(state);
|
||||
}
|
||||
};
|
||||
|
||||
virtual tresult PLUGIN_API activateBus(Steinberg::Vst::MediaType type,
|
||||
Steinberg::Vst::BusDirection dir,
|
||||
int32 index,
|
||||
|
||||
Reference in New Issue
Block a user