mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-09 20:29:10 +02:00
Implement IComponent::setIoMode()
This commit is contained in:
@@ -72,6 +72,14 @@ void Vst3Logger::log_request(bool is_host_vst,
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Vst3Logger::log_request(bool is_host_vst,
|
||||||
|
const YaComponent::SetIoMode& request) {
|
||||||
|
log_request_base(is_host_vst, [&](auto& message) {
|
||||||
|
message << "<IComponent* #" << request.instance_id << ">::setIoMode("
|
||||||
|
<< request.mode << ")";
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
void Vst3Logger::log_request(bool is_host_vst,
|
void Vst3Logger::log_request(bool is_host_vst,
|
||||||
const YaPluginFactory::Construct&) {
|
const YaPluginFactory::Construct&) {
|
||||||
log_request_base(is_host_vst,
|
log_request_base(is_host_vst,
|
||||||
|
|||||||
@@ -60,6 +60,7 @@ class Vst3Logger {
|
|||||||
void log_request(bool is_host_vst, const YaComponent::Destruct&);
|
void log_request(bool is_host_vst, const YaComponent::Destruct&);
|
||||||
void log_request(bool is_host_vst, const YaComponent::Initialize&);
|
void log_request(bool is_host_vst, const YaComponent::Initialize&);
|
||||||
void log_request(bool is_host_vst, const YaComponent::Terminate&);
|
void log_request(bool is_host_vst, const YaComponent::Terminate&);
|
||||||
|
void log_request(bool is_host_vst, const YaComponent::SetIoMode&);
|
||||||
void log_request(bool is_host_vst, const YaPluginFactory::Construct&);
|
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 YaPluginFactory::SetHostContext&);
|
||||||
void log_request(bool is_host_vst, const WantsConfiguration&);
|
void log_request(bool is_host_vst, const WantsConfiguration&);
|
||||||
|
|||||||
@@ -61,6 +61,7 @@ using ControlRequest = std::variant<YaComponent::Construct,
|
|||||||
YaComponent::Destruct,
|
YaComponent::Destruct,
|
||||||
YaComponent::Initialize,
|
YaComponent::Initialize,
|
||||||
YaComponent::Terminate,
|
YaComponent::Terminate,
|
||||||
|
YaComponent::SetIoMode,
|
||||||
YaPluginFactory::Construct,
|
YaPluginFactory::Construct,
|
||||||
YaPluginFactory::SetHostContext>;
|
YaPluginFactory::SetHostContext>;
|
||||||
|
|
||||||
|
|||||||
@@ -171,6 +171,25 @@ class YaComponent : public Steinberg::Vst::IComponent {
|
|||||||
|
|
||||||
// From `IComponent`
|
// From `IComponent`
|
||||||
tresult PLUGIN_API getControllerClassId(Steinberg::TUID classId) override;
|
tresult PLUGIN_API getControllerClassId(Steinberg::TUID classId) override;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Message to pass through a call to `IComponent::setIoMode(IoMode)` to the
|
||||||
|
* Wine plugin host.
|
||||||
|
*/
|
||||||
|
struct SetIoMode {
|
||||||
|
using Response = UniversalTResult;
|
||||||
|
|
||||||
|
native_size_t instance_id;
|
||||||
|
|
||||||
|
Steinberg::Vst::IoMode mode;
|
||||||
|
|
||||||
|
template <typename S>
|
||||||
|
void serialize(S& s) {
|
||||||
|
s.value8b(instance_id);
|
||||||
|
s.value4b(mode);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
virtual tresult PLUGIN_API
|
virtual tresult PLUGIN_API
|
||||||
setIoMode(Steinberg::Vst::IoMode mode) override = 0;
|
setIoMode(Steinberg::Vst::IoMode mode) override = 0;
|
||||||
virtual int32 PLUGIN_API
|
virtual int32 PLUGIN_API
|
||||||
|
|||||||
@@ -74,9 +74,10 @@ tresult PLUGIN_API YaComponentPluginImpl::terminate() {
|
|||||||
|
|
||||||
tresult PLUGIN_API
|
tresult PLUGIN_API
|
||||||
YaComponentPluginImpl::setIoMode(Steinberg::Vst::IoMode mode) {
|
YaComponentPluginImpl::setIoMode(Steinberg::Vst::IoMode mode) {
|
||||||
// TODO: Implement
|
return bridge
|
||||||
bridge.logger.log("TODO: IComponent::setIoMode()");
|
.send_message(YaComponent::SetIoMode{
|
||||||
return Steinberg::kNotImplemented;
|
.instance_id = arguments.instance_id, .mode = mode})
|
||||||
|
.native();
|
||||||
}
|
}
|
||||||
|
|
||||||
int32 PLUGIN_API
|
int32 PLUGIN_API
|
||||||
|
|||||||
@@ -107,6 +107,11 @@ void Vst3Bridge::run() {
|
|||||||
-> YaComponent::Terminate::Response {
|
-> YaComponent::Terminate::Response {
|
||||||
return component_instances[request.instance_id]->terminate();
|
return component_instances[request.instance_id]->terminate();
|
||||||
},
|
},
|
||||||
|
[&](const YaComponent::SetIoMode& request)
|
||||||
|
-> YaComponent::SetIoMode::Response {
|
||||||
|
return component_instances[request.instance_id]->setIoMode(
|
||||||
|
request.mode);
|
||||||
|
},
|
||||||
[&](const YaPluginFactory::Construct&)
|
[&](const YaPluginFactory::Construct&)
|
||||||
-> YaPluginFactory::Construct::Response {
|
-> YaPluginFactory::Construct::Response {
|
||||||
return YaPluginFactory::ConstructArgs(
|
return YaPluginFactory::ConstructArgs(
|
||||||
|
|||||||
Reference in New Issue
Block a user