diff --git a/examples/gain/src/lib.rs b/examples/gain/src/lib.rs index f7cf0d8..e599054 100644 --- a/examples/gain/src/lib.rs +++ b/examples/gain/src/lib.rs @@ -17,6 +17,7 @@ impl Plugin for Gain { fn info() -> PluginInfo { PluginInfo { name: "Gain".to_string(), + version: "0.1.0".to_string(), vendor: "Vendor".to_string(), url: "https://example.com".to_string(), email: "example@example.com".to_string(), diff --git a/src/format/clap/factory.rs b/src/format/clap/factory.rs index 8557087..e7ce84b 100644 --- a/src/format/clap/factory.rs +++ b/src/format/clap/factory.rs @@ -47,6 +47,7 @@ impl Factory

{ let name = CString::new(&*info.name).unwrap().into_raw(); let vendor = CString::new(&*info.vendor).unwrap().into_raw(); let url = CString::new(&*info.url).unwrap().into_raw(); + let version = CString::new(&*info.version).unwrap().into_raw(); const EMPTY: &'static CStr = unsafe { CStr::from_bytes_with_nul_unchecked(b"\0") }; const FEATURES: &'static [*const c_char] = &[ptr::null()]; @@ -60,7 +61,7 @@ impl Factory

{ url, manual_url: EMPTY.as_ptr(), support_url: EMPTY.as_ptr(), - version: EMPTY.as_ptr(), + version, description: EMPTY.as_ptr(), features: FEATURES.as_ptr(), }, @@ -76,6 +77,7 @@ impl Factory

{ drop(CString::from_raw(state.descriptor.name as *mut c_char)); drop(CString::from_raw(state.descriptor.vendor as *mut c_char)); drop(CString::from_raw(state.descriptor.url as *mut c_char)); + drop(CString::from_raw(state.descriptor.version as *mut c_char)); } } diff --git a/src/format/vst3/factory.rs b/src/format/vst3/factory.rs index 90e7117..0980583 100644 --- a/src/format/vst3/factory.rs +++ b/src/format/vst3/factory.rs @@ -96,7 +96,7 @@ impl IPluginFactory2Trait for Factory

{ info.classFlags = 0; copy_cstring("Fx", &mut info.subCategories); copy_cstring(&self.info.vendor, &mut info.vendor); - copy_cstring("", &mut info.version); + copy_cstring(&self.info.version, &mut info.version); let version_str = CStr::from_ptr(SDKVersionString).to_str().unwrap(); copy_cstring(version_str, &mut info.sdkVersion); @@ -119,7 +119,7 @@ impl IPluginFactory3Trait for Factory

{ info.classFlags = 0; copy_cstring("Fx", &mut info.subCategories); copy_wstring(&self.info.vendor, &mut info.vendor); - copy_wstring("", &mut info.version); + copy_wstring(&self.info.version, &mut info.version); let version_str = CStr::from_ptr(SDKVersionString).to_str().unwrap(); copy_wstring(version_str, &mut info.sdkVersion); diff --git a/src/lib.rs b/src/lib.rs index 9db8328..9f1a652 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -22,6 +22,7 @@ pub type ParamValue = f64; pub struct PluginInfo { pub name: String, + pub version: String, pub vendor: String, pub url: String, pub email: String,