mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-10 04:30:12 +02:00
Log unknown interfaces in IComponent::initialize()
This commit is contained in:
@@ -128,7 +128,7 @@ class YaComponent : public Steinberg::Vst::IComponent {
|
|||||||
virtual tresult PLUGIN_API initialize(FUnknown* context) override = 0;
|
virtual tresult PLUGIN_API initialize(FUnknown* context) override = 0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Message to pass through a call to `IComponent::terminate()` to the Wine
|
* Message to pass through a call to `IPluginBase::terminate()` to the Wine
|
||||||
* plugin host.
|
* plugin host.
|
||||||
*/
|
*/
|
||||||
struct Terminate {
|
struct Terminate {
|
||||||
|
|||||||
@@ -35,6 +35,28 @@ YaComponentPluginImpl::queryInterface(const ::Steinberg::TUID _iid,
|
|||||||
}
|
}
|
||||||
|
|
||||||
tresult PLUGIN_API YaComponentPluginImpl::initialize(FUnknown* context) {
|
tresult PLUGIN_API YaComponentPluginImpl::initialize(FUnknown* context) {
|
||||||
|
// This `context` will likely be an `IHostApplication`. If it is, we will
|
||||||
|
// store it here, and we'll proxy through all calls to it made from the Wine
|
||||||
|
// side. Otherwise we'll still call `IPluginBase::initialize()` but with a
|
||||||
|
// null pointer instead.
|
||||||
|
host_application_context = context;
|
||||||
|
if (host_application_context) {
|
||||||
|
// TODO: Init with `YaHostApplication`
|
||||||
|
} else {
|
||||||
|
context->iid;
|
||||||
|
|
||||||
|
char iid_string[128] = "<invalid_pointer>";
|
||||||
|
if (context) {
|
||||||
|
context->iid.print(iid_string,
|
||||||
|
Steinberg::FUID::UIDPrintStyle::kCLASS_UID);
|
||||||
|
}
|
||||||
|
|
||||||
|
bridge.logger.log("[Unknown interface] In IPluginBase::initialize(): " +
|
||||||
|
std::string(iid_string));
|
||||||
|
|
||||||
|
// TODO: Init with null pointer
|
||||||
|
}
|
||||||
|
|
||||||
// TODO: Implement
|
// TODO: Implement
|
||||||
return Steinberg::kNotImplemented;
|
return Steinberg::kNotImplemented;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,6 +16,8 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include <pluginterfaces/vst/ivsthostapplication.h>
|
||||||
|
|
||||||
#include "../vst3.h"
|
#include "../vst3.h"
|
||||||
|
|
||||||
class YaComponentPluginImpl : public YaComponent {
|
class YaComponentPluginImpl : public YaComponent {
|
||||||
@@ -61,4 +63,11 @@ class YaComponentPluginImpl : public YaComponent {
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
Vst3PluginBridge& bridge;
|
Vst3PluginBridge& bridge;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* An `IHostApplication` instance if we get one through
|
||||||
|
* `IPluginBase::initialize()`.
|
||||||
|
*/
|
||||||
|
Steinberg::FUnknownPtr<Steinberg::Vst::IHostApplication>
|
||||||
|
host_application_context;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -55,7 +55,9 @@ YaPluginFactoryPluginImpl::createInstance(Steinberg::FIDString cid,
|
|||||||
iid.print(iid_string, Steinberg::FUID::UIDPrintStyle::kCLASS_UID);
|
iid.print(iid_string, Steinberg::FUID::UIDPrintStyle::kCLASS_UID);
|
||||||
}
|
}
|
||||||
|
|
||||||
bridge.logger.log("[Unknown interface] " + std::string(iid_string));
|
bridge.logger.log(
|
||||||
|
"[Unknown interface] In IPluginFactory::createInstance(): " +
|
||||||
|
std::string(iid_string));
|
||||||
|
|
||||||
return Steinberg::kNotImplemented;
|
return Steinberg::kNotImplemented;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user