mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-10 04:30:12 +02:00
Add unknown interface logging on the Wine side
This commit is contained in:
@@ -32,9 +32,9 @@ Vst3ComponentHandlerProxyImpl::queryInterface(const Steinberg::TUID _iid,
|
|||||||
// TODO: Successful queries should also be logged
|
// TODO: Successful queries should also be logged
|
||||||
const tresult result = Vst3ComponentHandlerProxy::queryInterface(_iid, obj);
|
const tresult result = Vst3ComponentHandlerProxy::queryInterface(_iid, obj);
|
||||||
if (result != Steinberg::kResultOk) {
|
if (result != Steinberg::kResultOk) {
|
||||||
std::cerr << "TODO: Implement unknown interface logging on Wine side "
|
bridge.logger.log_unknown_interface(
|
||||||
"for Vst3ComponentHandlerProxyImpl::queryInterface"
|
"In IComponentHandler::queryInterface()",
|
||||||
<< std::endl;
|
Steinberg::FUID::fromTUID(_iid));
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
|
|||||||
@@ -29,9 +29,9 @@ Vst3ConnectionPointProxyImpl::queryInterface(const Steinberg::TUID _iid,
|
|||||||
// TODO: Successful queries should also be logged
|
// TODO: Successful queries should also be logged
|
||||||
const tresult result = Vst3ConnectionPointProxy::queryInterface(_iid, obj);
|
const tresult result = Vst3ConnectionPointProxy::queryInterface(_iid, obj);
|
||||||
if (result != Steinberg::kResultOk) {
|
if (result != Steinberg::kResultOk) {
|
||||||
std::cerr << "TODO: Implement unknown interface logging on Wine side "
|
bridge.logger.log_unknown_interface(
|
||||||
"for Vst3ConnectionPointProxyImpl::queryInterface"
|
"In IConnectionPoint::queryInterface()",
|
||||||
<< std::endl;
|
Steinberg::FUID::fromTUID(_iid));
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
|
|||||||
@@ -37,9 +37,8 @@ Vst3HostContextProxyImpl::queryInterface(const Steinberg::TUID _iid,
|
|||||||
// TODO: Successful queries should also be logged
|
// TODO: Successful queries should also be logged
|
||||||
const tresult result = Vst3HostContextProxy::queryInterface(_iid, obj);
|
const tresult result = Vst3HostContextProxy::queryInterface(_iid, obj);
|
||||||
if (result != Steinberg::kResultOk) {
|
if (result != Steinberg::kResultOk) {
|
||||||
std::cerr << "TODO: Implement unknown interface logging on Wine side "
|
bridge.logger.log_unknown_interface("In FUnknown::queryInterface()",
|
||||||
"for Vst3HostContextProxyImpl::queryInterface"
|
Steinberg::FUID::fromTUID(_iid));
|
||||||
<< std::endl;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
@@ -84,9 +83,8 @@ Vst3HostContextProxyImpl::createInstance(Steinberg::TUID /*cid*/,
|
|||||||
// When the host requests an interface we do not (yet) implement,
|
// When the host requests an interface we do not (yet) implement,
|
||||||
// we'll print a recognizable log message
|
// we'll print a recognizable log message
|
||||||
const Steinberg::FUID uid = Steinberg::FUID::fromTUID(_iid);
|
const Steinberg::FUID uid = Steinberg::FUID::fromTUID(_iid);
|
||||||
std::cerr << "TODO: Implement unknown interface logging on Wine side "
|
bridge.logger.log_unknown_interface(
|
||||||
"for Vst3HostContextProxyImpl::createInstance"
|
"In IHostApplication::createInstance()", uid);
|
||||||
<< std::endl;
|
|
||||||
|
|
||||||
return Steinberg::kNotImplemented;
|
return Steinberg::kNotImplemented;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -31,9 +31,8 @@ Vst3PlugFrameProxyImpl::queryInterface(const Steinberg::TUID _iid, void** obj) {
|
|||||||
// TODO: Successful queries should also be logged
|
// TODO: Successful queries should also be logged
|
||||||
const tresult result = Vst3PlugFrameProxy::queryInterface(_iid, obj);
|
const tresult result = Vst3PlugFrameProxy::queryInterface(_iid, obj);
|
||||||
if (result != Steinberg::kResultOk) {
|
if (result != Steinberg::kResultOk) {
|
||||||
std::cerr << "TODO: Implement unknown interface logging on Wine side "
|
bridge.logger.log_unknown_interface("In IPlugFrame::queryInterface()",
|
||||||
"for Vst3PlugFrameProxyImpl::queryInterface"
|
Steinberg::FUID::fromTUID(_iid));
|
||||||
<< std::endl;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
|
|||||||
@@ -40,6 +40,8 @@ Vst3Bridge::Vst3Bridge(MainContext& main_context,
|
|||||||
std::string plugin_dll_path,
|
std::string plugin_dll_path,
|
||||||
std::string endpoint_base_dir)
|
std::string endpoint_base_dir)
|
||||||
: HostBridge(plugin_dll_path),
|
: HostBridge(plugin_dll_path),
|
||||||
|
generic_logger(Logger::create_wine_stderr()),
|
||||||
|
logger(generic_logger),
|
||||||
main_context(main_context),
|
main_context(main_context),
|
||||||
sockets(main_context.context, endpoint_base_dir, false) {
|
sockets(main_context.context, endpoint_base_dir, false) {
|
||||||
std::string error;
|
std::string error;
|
||||||
|
|||||||
@@ -263,6 +263,20 @@ class Vst3Bridge : public HostBridge {
|
|||||||
return do_call_response.get();
|
return do_call_response.get();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private:
|
||||||
|
Logger generic_logger;
|
||||||
|
|
||||||
|
public:
|
||||||
|
/**
|
||||||
|
* A logger instance we'll use to log about failed
|
||||||
|
* `FUnknown::queryInterface` calls, so they can be hidden on verbosity
|
||||||
|
* level 0.
|
||||||
|
*
|
||||||
|
* This only has to be used instead of directly writing to `std::cerr` when
|
||||||
|
* the message should be hidden on lower verbosity levels.
|
||||||
|
*/
|
||||||
|
Vst3Logger logger;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
/**
|
/**
|
||||||
* Generate a nique instance identifier using an atomic fetch-and-add. This
|
* Generate a nique instance identifier using an atomic fetch-and-add. This
|
||||||
|
|||||||
Reference in New Issue
Block a user