mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-09 20:29:10 +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 = "
|
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
|
* Message to pass through a call to
|
||||||
* `IPlugInterfaceSupport::isPlugInterfaceSupported(iid)` to the host
|
* `IPlugInterfaceSupport::isPlugInterfaceSupported(iid)` to the host
|
||||||
* context provided by 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 {
|
struct IsPlugInterfaceSupported {
|
||||||
using Response = UniversalTResult;
|
using Response = UniversalTResult;
|
||||||
@@ -80,7 +77,10 @@ class YaPlugInterfaceSupport : public Steinberg::Vst::IPlugInterfaceSupport {
|
|||||||
*/
|
*/
|
||||||
std::optional<native_size_t> owner_instance_id;
|
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>
|
template <typename S>
|
||||||
void serialize(S& s) {
|
void serialize(S& s) {
|
||||||
@@ -88,7 +88,7 @@ class YaPlugInterfaceSupport : public Steinberg::Vst::IPlugInterfaceSupport {
|
|||||||
[](S& s, native_size_t& instance_id) {
|
[](S& s, native_size_t& instance_id) {
|
||||||
s.value8b(instance_id);
|
s.value8b(instance_id);
|
||||||
});
|
});
|
||||||
s.container1b(iid);
|
s.object(iid);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
+20
-21
@@ -271,27 +271,26 @@ Vst3PluginBridge::Vst3PluginBridge()
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
[&](const YaPlugInterfaceSupport::IsPlugInterfaceSupported&
|
[&](const YaPlugInterfaceSupport::IsPlugInterfaceSupported&
|
||||||
request) -> YaPlugInterfaceSupport::
|
request)
|
||||||
IsPlugInterfaceSupported::Response {
|
-> YaPlugInterfaceSupport::IsPlugInterfaceSupported::
|
||||||
// TODO: For correctness' sake we
|
Response {
|
||||||
// should automatically reject
|
// TODO: For correctness' sake we should
|
||||||
// queries for interfaces we
|
// automatically reject queries for interfaces
|
||||||
// don't yet or can't implement,
|
// we don't yet or can't implement, like the
|
||||||
// like the ARA interfaces.
|
// ARA interfaces.
|
||||||
if (request.owner_instance_id) {
|
if (request.owner_instance_id) {
|
||||||
return plugin_proxies
|
return plugin_proxies
|
||||||
.at(*request.owner_instance_id)
|
.at(*request.owner_instance_id)
|
||||||
.get()
|
.get()
|
||||||
.plug_interface_support
|
.plug_interface_support
|
||||||
->isPlugInterfaceSupported(
|
->isPlugInterfaceSupported(
|
||||||
request.iid.data());
|
request.iid.get_native_uid().data());
|
||||||
} else {
|
} else {
|
||||||
return plugin_factory
|
return plugin_factory->plug_interface_support
|
||||||
->plug_interface_support
|
->isPlugInterfaceSupported(
|
||||||
->isPlugInterfaceSupported(
|
request.iid.get_native_uid().data());
|
||||||
request.iid.data());
|
}
|
||||||
}
|
},
|
||||||
},
|
|
||||||
[&](const YaProgress::Start& request)
|
[&](const YaProgress::Start& request)
|
||||||
-> YaProgress::Start::Response {
|
-> YaProgress::Start::Response {
|
||||||
Steinberg::Vst::IProgress::ID out_id;
|
Steinberg::Vst::IProgress::ID out_id;
|
||||||
|
|||||||
@@ -100,8 +100,7 @@ Vst3HostContextProxyImpl::isPlugInterfaceSupported(const Steinberg::TUID _iid) {
|
|||||||
return bridge.send_message(
|
return bridge.send_message(
|
||||||
YaPlugInterfaceSupport::IsPlugInterfaceSupported{
|
YaPlugInterfaceSupport::IsPlugInterfaceSupported{
|
||||||
.owner_instance_id = owner_instance_id(),
|
.owner_instance_id = owner_instance_id(),
|
||||||
.iid = std::to_array(
|
.iid = *reinterpret_cast<const Steinberg::TUID*>(&_iid)});
|
||||||
*reinterpret_cast<const Steinberg::TUID*>(&_iid))});
|
|
||||||
} else {
|
} else {
|
||||||
bridge.logger.log(
|
bridge.logger.log(
|
||||||
"WARNING: Null pointer passed to "
|
"WARNING: Null pointer passed to "
|
||||||
|
|||||||
Reference in New Issue
Block a user