mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-07 12:10:09 +02:00
Use UID conversion for IsPlugInterfaceSupported
I assume that this would also be necessary here, right?
This commit is contained in:
@@ -1296,7 +1296,8 @@ bool Vst3Logger::log_request(
|
||||
}
|
||||
|
||||
message << ": IPlugInterfaceSupport::isPlugInterfaceSupported(unitId = "
|
||||
<< format_uid(Steinberg::FUID::fromTUID(request.iid.data()))
|
||||
<< format_uid(Steinberg::FUID::fromTUID(
|
||||
request.iid.get_native_uid().data()))
|
||||
<< ")";
|
||||
});
|
||||
}
|
||||
|
||||
@@ -66,9 +66,6 @@ class YaPlugInterfaceSupport : public Steinberg::Vst::IPlugInterfaceSupport {
|
||||
* Message to pass through a call to
|
||||
* `IPlugInterfaceSupport::isPlugInterfaceSupported(iid)` to the host
|
||||
* context provided by the host.
|
||||
*
|
||||
* TODO: Figure out if we should translate the UIDs from Windows COM to
|
||||
* non-Windows COM.
|
||||
*/
|
||||
struct IsPlugInterfaceSupported {
|
||||
using Response = UniversalTResult;
|
||||
@@ -80,7 +77,10 @@ class YaPlugInterfaceSupport : public Steinberg::Vst::IPlugInterfaceSupport {
|
||||
*/
|
||||
std::optional<native_size_t> owner_instance_id;
|
||||
|
||||
ArrayUID iid;
|
||||
// TODO: Figure out if we should translate the UIDs from Windows COM to
|
||||
// non-Windows COM here. I have not actually seen this interface
|
||||
// used.
|
||||
WineUID iid;
|
||||
|
||||
template <typename S>
|
||||
void serialize(S& s) {
|
||||
@@ -88,7 +88,7 @@ class YaPlugInterfaceSupport : public Steinberg::Vst::IPlugInterfaceSupport {
|
||||
[](S& s, native_size_t& instance_id) {
|
||||
s.value8b(instance_id);
|
||||
});
|
||||
s.container1b(iid);
|
||||
s.object(iid);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
+20
-21
@@ -271,27 +271,26 @@ Vst3PluginBridge::Vst3PluginBridge()
|
||||
});
|
||||
},
|
||||
[&](const YaPlugInterfaceSupport::IsPlugInterfaceSupported&
|
||||
request) -> YaPlugInterfaceSupport::
|
||||
IsPlugInterfaceSupported::Response {
|
||||
// TODO: For correctness' sake we
|
||||
// should automatically reject
|
||||
// queries for interfaces we
|
||||
// don't yet or can't implement,
|
||||
// like the ARA interfaces.
|
||||
if (request.owner_instance_id) {
|
||||
return plugin_proxies
|
||||
.at(*request.owner_instance_id)
|
||||
.get()
|
||||
.plug_interface_support
|
||||
->isPlugInterfaceSupported(
|
||||
request.iid.data());
|
||||
} else {
|
||||
return plugin_factory
|
||||
->plug_interface_support
|
||||
->isPlugInterfaceSupported(
|
||||
request.iid.data());
|
||||
}
|
||||
},
|
||||
request)
|
||||
-> YaPlugInterfaceSupport::IsPlugInterfaceSupported::
|
||||
Response {
|
||||
// TODO: For correctness' sake we should
|
||||
// automatically reject queries for interfaces
|
||||
// we don't yet or can't implement, like the
|
||||
// ARA interfaces.
|
||||
if (request.owner_instance_id) {
|
||||
return plugin_proxies
|
||||
.at(*request.owner_instance_id)
|
||||
.get()
|
||||
.plug_interface_support
|
||||
->isPlugInterfaceSupported(
|
||||
request.iid.get_native_uid().data());
|
||||
} else {
|
||||
return plugin_factory->plug_interface_support
|
||||
->isPlugInterfaceSupported(
|
||||
request.iid.get_native_uid().data());
|
||||
}
|
||||
},
|
||||
[&](const YaProgress::Start& request)
|
||||
-> YaProgress::Start::Response {
|
||||
Steinberg::Vst::IProgress::ID out_id;
|
||||
|
||||
@@ -100,8 +100,7 @@ Vst3HostContextProxyImpl::isPlugInterfaceSupported(const Steinberg::TUID _iid) {
|
||||
return bridge.send_message(
|
||||
YaPlugInterfaceSupport::IsPlugInterfaceSupported{
|
||||
.owner_instance_id = owner_instance_id(),
|
||||
.iid = std::to_array(
|
||||
*reinterpret_cast<const Steinberg::TUID*>(&_iid))});
|
||||
.iid = *reinterpret_cast<const Steinberg::TUID*>(&_iid)});
|
||||
} else {
|
||||
bridge.logger.log(
|
||||
"WARNING: Null pointer passed to "
|
||||
|
||||
Reference in New Issue
Block a user