mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-07 03:50:11 +02:00
Fix messages between directly connecting objects
iZotope plugins will already send messages when connect() is called on the first object, so this flag has to be set on both host contexts at the same time.
This commit is contained in:
@@ -30,7 +30,7 @@ YaPluginFactoryImpl::createInstance(Steinberg::FIDString cid,
|
||||
void** obj) {
|
||||
// Class IDs may be padded with null bytes
|
||||
constexpr size_t uid_size = sizeof(Steinberg::TUID);
|
||||
if (!cid || !_iid || strnlen(_iid, uid_size) < uid_size) {
|
||||
if (!cid || !_iid || !obj || strnlen(_iid, uid_size) < uid_size) {
|
||||
return Steinberg::kInvalidArgument;
|
||||
}
|
||||
|
||||
@@ -62,6 +62,7 @@ YaPluginFactoryImpl::createInstance(Steinberg::FIDString cid,
|
||||
bridge.logger.log_unknown_interface(
|
||||
"In IPluginFactory::createInstance()", uid);
|
||||
|
||||
*obj = nullptr;
|
||||
return Steinberg::kNotImplemented;
|
||||
}
|
||||
|
||||
|
||||
@@ -62,7 +62,7 @@ Vst3HostContextProxyImpl::createInstance(Steinberg::TUID /*cid*/,
|
||||
// Class IDs don't have a meaning here, they just mirrored the interface
|
||||
// from `IPlugFactory::createInstance()`
|
||||
constexpr size_t uid_size = sizeof(Steinberg::TUID);
|
||||
if (!_iid || strnlen(_iid, uid_size) < uid_size) {
|
||||
if (!_iid || !obj || strnlen(_iid, uid_size) < uid_size) {
|
||||
return Steinberg::kInvalidArgument;
|
||||
}
|
||||
|
||||
@@ -98,6 +98,8 @@ Vst3HostContextProxyImpl::createInstance(Steinberg::TUID /*cid*/,
|
||||
"IHostApplication::createInstance() for indirectly "
|
||||
"connected objects has not yet been implemented"
|
||||
<< std::endl;
|
||||
|
||||
*obj = nullptr;
|
||||
return Steinberg::kNotImplemented;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -181,6 +181,9 @@ void Vst3Bridge::run() {
|
||||
object_instances[request.instance_id]
|
||||
.host_context_proxy->are_objects_directly_connected =
|
||||
true;
|
||||
object_instances[request.other_instance_id]
|
||||
.host_context_proxy->are_objects_directly_connected =
|
||||
true;
|
||||
}
|
||||
|
||||
return object_instances[request.instance_id]
|
||||
|
||||
Reference in New Issue
Block a user