mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-06-23 12:27:30 +02:00
Add stubs for an IComponent implementation
This commit is contained in:
@@ -56,3 +56,83 @@ YaPluginFactoryPluginImpl::setHostContext(Steinberg::FUnknown* /*context*/) {
|
|||||||
// host.
|
// host.
|
||||||
return Steinberg::kNotImplemented;
|
return Steinberg::kNotImplemented;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
YaComponentPluginImpl::YaComponentPluginImpl(Vst3PluginBridge& bridge,
|
||||||
|
YaComponent::Arguments&& args)
|
||||||
|
: YaComponent(std::move(args)), bridge(bridge) {}
|
||||||
|
|
||||||
|
YaComponentPluginImpl::~YaComponentPluginImpl() {
|
||||||
|
// TODO: Send a control message to destroy the instance on the Wine side
|
||||||
|
}
|
||||||
|
|
||||||
|
tresult PLUGIN_API
|
||||||
|
YaComponentPluginImpl::queryInterface(const ::Steinberg::TUID _iid,
|
||||||
|
void** obj) {
|
||||||
|
// TODO: Log when this fails on debug level 1, and on debug level 2 also log
|
||||||
|
// successful queries. This behaviour should be implemented for all
|
||||||
|
// interfaces.
|
||||||
|
return YaComponent::queryInterface(_iid, obj);
|
||||||
|
}
|
||||||
|
|
||||||
|
tresult PLUGIN_API YaComponentPluginImpl::initialize(FUnknown* context) {
|
||||||
|
// TODO: Implement
|
||||||
|
return Steinberg::kNotImplemented;
|
||||||
|
}
|
||||||
|
|
||||||
|
tresult PLUGIN_API YaComponentPluginImpl::terminate() {
|
||||||
|
// TODO: Implement
|
||||||
|
return Steinberg::kNotImplemented;
|
||||||
|
}
|
||||||
|
|
||||||
|
tresult PLUGIN_API
|
||||||
|
YaComponentPluginImpl::setIoMode(Steinberg::Vst::IoMode mode) {
|
||||||
|
// TODO: Implement
|
||||||
|
return Steinberg::kNotImplemented;
|
||||||
|
}
|
||||||
|
|
||||||
|
int32 PLUGIN_API
|
||||||
|
YaComponentPluginImpl::getBusCount(Steinberg::Vst::MediaType type,
|
||||||
|
Steinberg::Vst::BusDirection dir) {
|
||||||
|
// TODO: Implement
|
||||||
|
return Steinberg::kNotImplemented;
|
||||||
|
}
|
||||||
|
|
||||||
|
tresult PLUGIN_API
|
||||||
|
YaComponentPluginImpl::getBusInfo(Steinberg::Vst::MediaType type,
|
||||||
|
Steinberg::Vst::BusDirection dir,
|
||||||
|
int32 index,
|
||||||
|
Steinberg::Vst::BusInfo& bus /*out*/) {
|
||||||
|
// TODO: Implement
|
||||||
|
return Steinberg::kNotImplemented;
|
||||||
|
}
|
||||||
|
|
||||||
|
tresult PLUGIN_API YaComponentPluginImpl::getRoutingInfo(
|
||||||
|
Steinberg::Vst::RoutingInfo& inInfo,
|
||||||
|
Steinberg::Vst::RoutingInfo& outInfo /*out*/) {
|
||||||
|
// TODO: Implement
|
||||||
|
return Steinberg::kNotImplemented;
|
||||||
|
}
|
||||||
|
|
||||||
|
tresult PLUGIN_API
|
||||||
|
YaComponentPluginImpl::activateBus(Steinberg::Vst::MediaType type,
|
||||||
|
Steinberg::Vst::BusDirection dir,
|
||||||
|
int32 index,
|
||||||
|
TBool state) {
|
||||||
|
// TODO: Implement
|
||||||
|
return Steinberg::kNotImplemented;
|
||||||
|
}
|
||||||
|
|
||||||
|
tresult PLUGIN_API YaComponentPluginImpl::setActive(TBool state) {
|
||||||
|
// TODO: Implement
|
||||||
|
return Steinberg::kNotImplemented;
|
||||||
|
}
|
||||||
|
|
||||||
|
tresult PLUGIN_API YaComponentPluginImpl::setState(Steinberg::IBStream* state) {
|
||||||
|
// TODO: Implement
|
||||||
|
return Steinberg::kNotImplemented;
|
||||||
|
}
|
||||||
|
|
||||||
|
tresult PLUGIN_API YaComponentPluginImpl::getState(Steinberg::IBStream* state) {
|
||||||
|
// TODO: Implement
|
||||||
|
return Steinberg::kNotImplemented;
|
||||||
|
}
|
||||||
|
|||||||
@@ -20,6 +20,8 @@
|
|||||||
|
|
||||||
// These are implementation of the serialization clases in
|
// These are implementation of the serialization clases in
|
||||||
// `src/common/serialization/vst3/` to provide callback support
|
// `src/common/serialization/vst3/` to provide callback support
|
||||||
|
// TODO: Split this up in multiple headers. I hoped it might stay small and easy
|
||||||
|
// to oversee. It won't.
|
||||||
|
|
||||||
class YaPluginFactoryPluginImpl : public YaPluginFactory {
|
class YaPluginFactoryPluginImpl : public YaPluginFactory {
|
||||||
public:
|
public:
|
||||||
@@ -28,9 +30,53 @@ class YaPluginFactoryPluginImpl : public YaPluginFactory {
|
|||||||
tresult PLUGIN_API createInstance(Steinberg::FIDString cid,
|
tresult PLUGIN_API createInstance(Steinberg::FIDString cid,
|
||||||
Steinberg::FIDString _iid,
|
Steinberg::FIDString _iid,
|
||||||
void** obj) override;
|
void** obj) override;
|
||||||
|
|
||||||
tresult PLUGIN_API setHostContext(Steinberg::FUnknown* context) override;
|
tresult PLUGIN_API setHostContext(Steinberg::FUnknown* context) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Vst3PluginBridge& bridge;
|
Vst3PluginBridge& bridge;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class YaComponentPluginImpl : public YaComponent {
|
||||||
|
public:
|
||||||
|
YaComponentPluginImpl(Vst3PluginBridge& bridge,
|
||||||
|
YaComponent::Arguments&& args);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* When the reference count reaches zero and this destructor is called,
|
||||||
|
* we'll send a request to the Wine plugin host to destroy the corresponding
|
||||||
|
* object.
|
||||||
|
*/
|
||||||
|
~YaComponentPluginImpl();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* We'll override the query interface to log queries for interfaces we do
|
||||||
|
* not (yet) support.
|
||||||
|
*/
|
||||||
|
tresult PLUGIN_API queryInterface(const ::Steinberg::TUID _iid,
|
||||||
|
void** obj) override;
|
||||||
|
|
||||||
|
tresult PLUGIN_API initialize(FUnknown* context) override;
|
||||||
|
tresult PLUGIN_API terminate() override;
|
||||||
|
|
||||||
|
tresult PLUGIN_API setIoMode(Steinberg::Vst::IoMode mode) override;
|
||||||
|
int32 PLUGIN_API getBusCount(Steinberg::Vst::MediaType type,
|
||||||
|
Steinberg::Vst::BusDirection dir) override;
|
||||||
|
tresult PLUGIN_API
|
||||||
|
getBusInfo(Steinberg::Vst::MediaType type,
|
||||||
|
Steinberg::Vst::BusDirection dir,
|
||||||
|
int32 index,
|
||||||
|
Steinberg::Vst::BusInfo& bus /*out*/) override;
|
||||||
|
tresult PLUGIN_API
|
||||||
|
getRoutingInfo(Steinberg::Vst::RoutingInfo& inInfo,
|
||||||
|
Steinberg::Vst::RoutingInfo& outInfo /*out*/) override;
|
||||||
|
tresult PLUGIN_API activateBus(Steinberg::Vst::MediaType type,
|
||||||
|
Steinberg::Vst::BusDirection dir,
|
||||||
|
int32 index,
|
||||||
|
TBool state) override;
|
||||||
|
tresult PLUGIN_API setActive(TBool state) override;
|
||||||
|
tresult PLUGIN_API setState(Steinberg::IBStream* state) override;
|
||||||
|
tresult PLUGIN_API getState(Steinberg::IBStream* state) override;
|
||||||
|
|
||||||
|
private:
|
||||||
|
Vst3PluginBridge& bridge;
|
||||||
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user