1
0
Fork 0

Allow creating VST3 plugin instances

This commit is contained in:
Robbert van der Helm 2022-01-26 21:12:02 +01:00
parent a959f7a2ad
commit 4014d83a9b

View file

@ -90,12 +90,17 @@ impl<P: Plugin> IPluginFactory for Factory<P> {
unsafe fn create_instance( unsafe fn create_instance(
&self, &self,
cid: *const vst3_com::IID, cid: *const vst3_sys::IID,
_iid: *const vst3_com::IID, _iid: *const vst3_sys::IID,
obj: *mut *mut vst3_com::c_void, obj: *mut *mut vst3_sys::c_void,
) -> tresult { ) -> tresult {
return kResultFalse; if *cid != self.cid {
todo!() return kNoInterface;
}
*obj = Box::into_raw(Wrapper::<P>::new()) as *mut vst3_sys::c_void;
kResultOk
} }
} }