From 15e8dc5677c026d595d2c66749d5e880f2bda9e2 Mon Sep 17 00:00:00 2001
From: m-hilgendorf <mike@hilgendorf.audio>
Date: Sat, 1 Aug 2020 21:42:26 -0700
Subject: [PATCH 1/6] Additions and updates for VST 3.7.0

---
 src/vst/ivstaudioprocessor.rs        | 23 +++++++++++++++++++++++
 src/vst/ivsteditcontroller.rs        | 20 +++++++++++++++++++-
 src/vst/ivstparameterfunctionname.rs | 26 ++++++++++++++++++++++++++
 src/vst/mod.rs                       |  3 ++-
 src/vst/vsttypes.rs                  |  4 ++--
 5 files changed, 72 insertions(+), 4 deletions(-)
 create mode 100644 src/vst/ivstparameterfunctionname.rs

diff --git a/src/vst/ivstaudioprocessor.rs b/src/vst/ivstaudioprocessor.rs
index d603c60..1722724 100644
--- a/src/vst/ivstaudioprocessor.rs
+++ b/src/vst/ivstaudioprocessor.rs
@@ -90,3 +90,26 @@ pub trait IAudioPresentationLatency: IUnknown {
         latency_samples: u32,
     ) -> tresult;
 }
+
+/// Flags used by [IProcessContextRequirements] to signal to the host what
+/// data is required by the process context for your plugin. Required if you
+/// plan to support > 3.7.0 hosts.
+#[allow(non_snake_case)]
+pub mod IProcessContextRequirementsFlags {
+    pub const kNeedSystemTime: u32 = 1 << 0;
+    pub const kNeedContinousTimeSamples: u32 = 1 << 1;
+    pub const kNeedProjectTimeMusic: u32 = 1 << 2;
+    pub const kNeedBarPositionMusic: u32 = 1 << 3;
+    pub const kNeedCycleMusic: u32 = 1 << 4;
+    pub const kNeedSamplesToNextClock: u32 = 1 << 5;
+    pub const kNeedTempo: u32 = 1 << 6;
+    pub const kNeedTimeSignature: u32 = 1 << 7;
+    pub const kNeedChord: u32 = 1 << 8;
+    pub const kNeedFrameRate: u32 = 1 << 9;
+    pub const kNeedTransportState: u32 = 1 << 10;
+}
+
+#[com_interface("2A654303-EF76-4E3D-95B5-FE83730EF6D0")]
+pub trait IProcessContextRequirements: IUnknown {
+    unsafe fn get_process_context_requirements(&self) -> u32;
+}
diff --git a/src/vst/ivsteditcontroller.rs b/src/vst/ivsteditcontroller.rs
index 7d313e6..9e433ff 100644
--- a/src/vst/ivsteditcontroller.rs
+++ b/src/vst/ivsteditcontroller.rs
@@ -1,4 +1,4 @@
-use crate::base::{tresult, FIDString, IPluginBase, TBool};
+use crate::base::{tchar, tresult, FIDString, IPluginBase, TBool};
 use crate::vst::{
     BusDirection, CString, CtrlNumber, KnobMode, MediaType, ParamID, ParamValue, String128, TChar,
 };
@@ -122,3 +122,21 @@ pub trait IEditControllerHostEditing: IUnknown {
     unsafe fn begin_edit_from_host(&self, id: ParamID) -> tresult;
     unsafe fn end_edit_from_host(&self, id: ParamID) -> tresult;
 }
+
+#[allow(non_snake_case)]
+pub mod ProgressType {
+    pub const AsyncStateRestoration: u32 = 0;
+    pub const UIBackgroundTask: u32 = 1;
+}
+
+#[com_interface("00C9DC5B-9D90-4254-91A3-88C8B4E91B69")]
+pub trait IProgress: IUnknown {
+    unsafe fn start(
+        &self,
+        progress_type: u32,
+        optional_description: *const tchar,
+        out_id: *mut u64,
+    ) -> i32; // fucking _why_
+    unsafe fn update(&self, id: u64, value: f64);
+    unsafe fn finish(&self, id: u64);
+}
diff --git a/src/vst/ivstparameterfunctionname.rs b/src/vst/ivstparameterfunctionname.rs
new file mode 100644
index 0000000..e512eff
--- /dev/null
+++ b/src/vst/ivstparameterfunctionname.rs
@@ -0,0 +1,26 @@
+use crate::base::{tresult, FIDString};
+use crate::vst::{ParamID, UnitID};
+use vst3_com::com_interface;
+use vst3_com::interfaces::iunknown::IUnknown;
+
+#[allow(non_snake_case)]
+pub mod FunctionNameType {
+    pub const kStringStereoTRS: &[u8; 8usize] = b"Trl Trr\0";
+    pub const kCompGainReduction: &'static [u8] = b"Comp:GainReduction\0";
+    pub const kCompGainReductionMax: &'static [u8] = b"Comp:GainReductionMax\0";
+    pub const kCompGainReductionPeakHold: &'static [u8] = b"Comp:GainReductionPeakHold\0";
+    pub const kCompResetGainReductionMax: &'static [u8] = b"Comp:ResetGainReductionMax\0";
+    pub const kLowLatencyMode: &'static [u8] = b"LowLatencyMode\0";
+    pub const kRandomize: &'static [u8] = b"Randomize\0";
+    pub const kWetDryMix: &'static [u8] = b"WetDryMix\0";
+}
+
+#[com_interface("6D21E1DC-9119-9D4B-A2A0-2FEF6C1AE55C")]
+pub trait IParameterFunctionName: IUnknown {
+    unsafe fn get_parameter_id_from_function_name(
+        &self,
+        unit_id: UnitID,
+        function_name: FIDString,
+        parameter_id: ParamID,
+    ) -> tresult;
+}
diff --git a/src/vst/mod.rs b/src/vst/mod.rs
index 6dee797..58a5d55 100644
--- a/src/vst/mod.rs
+++ b/src/vst/mod.rs
@@ -12,6 +12,7 @@ mod ivstmidicontroller;
 mod ivstmidilearn;
 mod ivstnoteexpression;
 mod ivstparameterchanges;
+mod ivstparameterfunctionname;
 mod ivstphysicalui;
 mod ivstpluginteracesupport;
 mod ivstplugview;
@@ -36,6 +37,7 @@ pub use ivstmidicontroller::*;
 pub use ivstmidilearn::*;
 pub use ivstnoteexpression::*;
 pub use ivstparameterchanges::*;
+pub use ivstparameterfunctionname::*;
 pub use ivstphysicalui::*;
 pub use ivstpluginteracesupport::*;
 pub use ivstplugview::*;
@@ -45,4 +47,3 @@ pub use ivstrepresentation::*;
 pub use ivstunits::*;
 pub use vstspeaker::*;
 pub use vsttypes::*;
-// test/itest vstspeaker.h,
diff --git a/src/vst/vsttypes.rs b/src/vst/vsttypes.rs
index 166646d..6b3748d 100644
--- a/src/vst/vsttypes.rs
+++ b/src/vst/vsttypes.rs
@@ -22,7 +22,7 @@ pub type KnobMode = i32;
 
 pub const kNoParamId: ParamID = 0xFFFF_FFFF;
 pub const kVstVersionMajor: i32 = 3;
-pub const kVstVersionMinor: i32 = 6;
-pub const kVstVersionSub: i32 = 13;
+pub const kVstVersionMinor: i32 = 7;
+pub const kVstVersionSub: i32 = 0;
 pub const VST_VERSION: i32 = (kVstVersionMajor << 16) | (kVstVersionMinor << 8) | kVstVersionSub;
 pub const kVstVersionString: CString = b"VST 3.6.13\0".as_ptr() as *const _;

From bec4c98944c249e7cf6f597ac993ef6aa36a628c Mon Sep 17 00:00:00 2001
From: m-hilgendorf <mike@hilgendorf.audio>
Date: Sat, 22 Aug 2020 11:54:19 -0700
Subject: [PATCH 2/6] Corrected some out of date interface definitions and
 incorrect types

---
 com/src/sys.rs                |  2 +-
 examples/again/src/lib.rs     | 73 ++++++++++++++++-------------------
 examples/passthru.rs          | 21 +++++-----
 src/utils.rs                  |  5 ++-
 src/vst/ivstcomponent.rs      | 10 ++---
 src/vst/ivsteditcontroller.rs | 11 +++---
 src/vst/ivstprocesscontext.rs |  3 ++
 7 files changed, 63 insertions(+), 62 deletions(-)

diff --git a/com/src/sys.rs b/com/src/sys.rs
index 1969bef..7d9d919 100644
--- a/com/src/sys.rs
+++ b/com/src/sys.rs
@@ -51,7 +51,7 @@ pub const COINIT_MULTITHREADED: u32 = 0x0;
 
 /// A globally unique identifier
 #[repr(C)]
-#[derive(Copy, Clone, PartialEq, Eq)]
+#[derive(Copy, Clone, PartialEq, Eq, Hash)]
 pub struct GUID {
     /// bytes of the GUID
     pub data: [u8; 16],
diff --git a/examples/again/src/lib.rs b/examples/again/src/lib.rs
index 6e1435d..6c580b5 100644
--- a/examples/again/src/lib.rs
+++ b/examples/again/src/lib.rs
@@ -255,16 +255,14 @@ impl IComponent for AGainProcessor {
         kResultOk
     }
 
-    unsafe fn set_state(&self, state: *mut c_void) -> tresult {
+    unsafe fn set_state(&self, state: VstPtr<dyn IBStream>) -> tresult {
         info!("Called: AGainProcessor::set_state()");
 
-        if state.is_null() {
+        let state = state.upgrade();
+        if state.is_none() {
             return kResultFalse;
         }
-
-        let state = state as *mut *mut _;
-        let state: ComPtr<dyn IBStream> = ComPtr::new(state);
-
+        let state = state.unwrap();
         let mut num_bytes_read = 0;
         let mut saved_gain = 0.0;
         let mut saved_bypass = false;
@@ -284,16 +282,14 @@ impl IComponent for AGainProcessor {
         kResultOk
     }
 
-    unsafe fn get_state(&self, state: *mut c_void) -> tresult {
+    unsafe fn get_state(&self, state: VstPtr<dyn IBStream>) -> tresult {
         info!("Called: AGainProcessor::get_state()");
-
-        if state.is_null() {
+        let state = state.upgrade();
+        if state.is_none() {
             return kResultFalse;
         }
 
-        let state = state as *mut *mut _;
-        let state: ComPtr<dyn IBStream> = ComPtr::new(state);
-
+        let state = state.unwrap();
         let mut num_bytes_written = 0;
         let gain_ptr = &mut self.gain.borrow_mut().0 as *mut f64 as *mut c_void;
         let bypass_ptr = &mut self.bypass.borrow_mut().0 as *mut bool as *mut c_void;
@@ -552,43 +548,40 @@ impl AGainController {
 }
 
 impl IEditController for AGainController {
-    unsafe fn set_component_state(&self, state: *mut c_void) -> tresult {
+    unsafe fn set_component_state(&self, state: VstPtr<dyn IBStream>) -> tresult {
         info!("Called: AGainController::set_component_state()");
 
         if state.is_null() {
             return kResultFalse;
         }
 
-        let state = state as *mut *mut _;
-        let state: ComPtr<dyn IBStream> = ComPtr::new(state);
-
-        let mut num_bytes_read = 0;
-        let mut saved_gain = 0.0;
-        let mut saved_bypass = false;
-        let gain_ptr = &mut saved_gain as *mut f64 as *mut c_void;
-        let bypass_ptr = &mut saved_bypass as *mut bool as *mut c_void;
-
-        state.read(gain_ptr, mem::size_of::<f64>() as i32, &mut num_bytes_read);
-        state.read(
-            bypass_ptr,
-            mem::size_of::<bool>() as i32,
-            &mut num_bytes_read,
-        );
-
-        info!("saved_gain: {}", saved_gain);
-        info!("saved_bypass: {}", saved_bypass);
-
-        self.set_param_normalized(0, saved_gain);
-        self.set_param_normalized(1, if saved_bypass { 1.0 } else { 0.0 });
-
+        if let Some(state) = state.upgrade() {
+            let mut num_bytes_read = 0;
+            let mut saved_gain = 0.0;
+            let mut saved_bypass = false;
+            let gain_ptr = &mut saved_gain as *mut f64 as *mut c_void;
+            let bypass_ptr = &mut saved_bypass as *mut bool as *mut c_void;
+            state.read(gain_ptr, mem::size_of::<f64>() as i32, &mut num_bytes_read);
+            state.read(
+                bypass_ptr,
+                mem::size_of::<bool>() as i32,
+                &mut num_bytes_read,
+            );
+
+            info!("saved_gain: {}", saved_gain);
+            info!("saved_bypass: {}", saved_bypass);
+
+            self.set_param_normalized(0, saved_gain);
+            self.set_param_normalized(1, if saved_bypass { 1.0 } else { 0.0 });
+        }
         kResultOk
     }
-    unsafe fn set_state(&self, _state: *mut c_void) -> tresult {
+    unsafe fn set_state(&self, _state: VstPtr<dyn IBStream>) -> tresult {
         info!("Called: AGainController::set_state()");
 
         kResultOk
     }
-    unsafe fn get_state(&self, _state: *mut c_void) -> tresult {
+    unsafe fn get_state(&self, _state: VstPtr<dyn IBStream>) -> tresult {
         info!("Called: AGainController::get_state()");
 
         kResultOk
@@ -678,10 +671,10 @@ impl IEditController for AGainController {
             _ => kResultFalse,
         }
     }
-    unsafe fn set_component_handler(&self, handler: *mut c_void) -> tresult {
+    unsafe fn set_component_handler(&self, mut handler: VstPtr<dyn IComponentHandler>) -> tresult {
         info!("Called: AGainController::set_component_handler()");
 
-        if self.component_handler.borrow().0 == handler {
+        if self.component_handler.borrow().0 == handler.as_raw_mut() as *mut _ {
             return kResultTrue;
         }
 
@@ -691,7 +684,7 @@ impl IEditController for AGainController {
             component_handler.release();
         }
 
-        self.component_handler.borrow_mut().0 = handler;
+        self.component_handler.borrow_mut().0 = handler.as_raw_mut() as *mut _;
         if !self.component_handler.borrow().0.is_null() {
             let component_handler = self.component_handler.borrow_mut().0 as *mut *mut _;
             let component_handler: ComPtr<dyn IComponentHandler> = ComPtr::new(component_handler);
diff --git a/examples/passthru.rs b/examples/passthru.rs
index 3eea8ce..b0b6f72 100644
--- a/examples/passthru.rs
+++ b/examples/passthru.rs
@@ -10,15 +10,16 @@ use std::{
     ptr::{copy_nonoverlapping, null_mut},
 };
 use vst3_com::{sys::GUID, IID};
+use vst3_sys::utils::VstPtr;
 use vst3_sys::{
     base::{
-        kInvalidArgument, kResultFalse, kResultOk, tresult, FIDString, IPluginBase, IPluginFactory,
-        TBool,
+        kInvalidArgument, kResultFalse, kResultOk, tresult, FIDString, IBStream, IPluginBase,
+        IPluginFactory, TBool,
     },
     vst::{
         AudioBusBuffers, BusDirection, BusDirections, BusFlags, BusInfo, IAudioPresentationLatency,
-        IAudioProcessor, IAutomationState, IComponent, IEditController, MediaTypes, ParameterInfo,
-        ProcessData, ProcessSetup, RoutingInfo, TChar,
+        IAudioProcessor, IAutomationState, IComponent, IComponentHandler, IEditController,
+        MediaTypes, ParameterInfo, ProcessData, ProcessSetup, RoutingInfo, TChar,
     },
     VST3,
 };
@@ -60,15 +61,15 @@ impl PassthruPlugin {
 pub struct Factory {}
 
 impl IEditController for PassthruPlugin {
-    unsafe fn set_component_state(&self, _state: *mut c_void) -> tresult {
+    unsafe fn set_component_state(&self, _state: VstPtr<dyn IBStream>) -> tresult {
         info!("set_component_state");
         kResultOk
     }
-    unsafe fn set_state(&self, _state: *mut c_void) -> tresult {
+    unsafe fn set_state(&self, _state: VstPtr<dyn IBStream>) -> tresult {
         info!("set_state");
         kResultOk
     }
-    unsafe fn get_state(&self, _state: *mut c_void) -> tresult {
+    unsafe fn get_state(&self, _state: VstPtr<dyn IBStream>) -> tresult {
         info!("get_state");
         kResultOk
     }
@@ -114,7 +115,7 @@ impl IEditController for PassthruPlugin {
         info!("set_param_normalized");
         kResultOk
     }
-    unsafe fn set_component_handler(&self, _handler: *mut c_void) -> tresult {
+    unsafe fn set_component_handler(&self, _handler: VstPtr<dyn IComponentHandler>) -> tresult {
         info!("set_component_handler");
         kResultOk
     }
@@ -261,11 +262,11 @@ impl IComponent for PassthruPlugin {
         kResultOk
     }
 
-    unsafe fn set_state(&self, _state: *mut c_void) -> tresult {
+    unsafe fn set_state(&self, _state: VstPtr<dyn IBStream>) -> tresult {
         kResultOk
     }
 
-    unsafe fn get_state(&self, _state: *mut c_void) -> tresult {
+    unsafe fn get_state(&self, _state: VstPtr<dyn IBStream>) -> tresult {
         kResultOk
     }
 }
diff --git a/src/utils.rs b/src/utils.rs
index 3402333..c0b599a 100644
--- a/src/utils.rs
+++ b/src/utils.rs
@@ -1,6 +1,5 @@
 //! Utilities for consumers of the raw API
 use vst3_com::{ComInterface, ComPtr};
-
 /// A thin wrapper around a raw pointer to a vtable. Used in traits that return pointers to instances.
 #[repr(transparent)]
 #[derive(Copy, Clone, Debug)]
@@ -9,10 +8,14 @@ pub struct VstPtr<I: ComInterface + ?Sized> {
 }
 
 impl<I: ComInterface + ?Sized> VstPtr<I> {
+    pub fn as_raw_mut(&mut self) -> *mut *mut <I as ComInterface>::VTable {
+        self.inst
+    }
     /// check if the underlying pointer is null
     pub fn is_null(&self) -> bool {
         self.inst.is_null()
     }
+
     /// Promote the pointer to a reference count, returns `None` if the pointer is null.
     pub fn upgrade(&self) -> Option<ComPtr<I>> {
         if self.inst.is_null() {
diff --git a/src/vst/ivstcomponent.rs b/src/vst/ivstcomponent.rs
index 9f62c4b..2c70e0c 100644
--- a/src/vst/ivstcomponent.rs
+++ b/src/vst/ivstcomponent.rs
@@ -1,7 +1,7 @@
-use crate::base::{tresult, FactoryFlags, IPluginBase, TBool};
+use crate::base::{tresult, FactoryFlags, IBStream, IPluginBase, TBool};
+use crate::utils::VstPtr;
 use crate::vst::{BusDirection, IoMode, MediaType, String128};
-use vst3_com::{c_void, com_interface, IID};
-
+use vst3_com::{com_interface, IID};
 pub const kDefaultFactoryFlags: i32 = FactoryFlags::kUnicode as i32;
 
 pub enum MediaTypes {
@@ -76,6 +76,6 @@ pub trait IComponent: IPluginBase {
         state: TBool,
     ) -> tresult;
     unsafe fn set_active(&self, state: TBool) -> tresult;
-    unsafe fn set_state(&self, state: *mut c_void) -> tresult;
-    unsafe fn get_state(&self, state: *mut c_void) -> tresult;
+    unsafe fn set_state(&self, state: VstPtr<dyn IBStream>) -> tresult;
+    unsafe fn get_state(&self, state: VstPtr<dyn IBStream>) -> tresult;
 }
diff --git a/src/vst/ivsteditcontroller.rs b/src/vst/ivsteditcontroller.rs
index 7d313e6..531ecec 100644
--- a/src/vst/ivsteditcontroller.rs
+++ b/src/vst/ivsteditcontroller.rs
@@ -1,4 +1,5 @@
-use crate::base::{tresult, FIDString, IPluginBase, TBool};
+use crate::base::{tresult, FIDString, IBStream, IPluginBase, TBool};
+use crate::utils::VstPtr;
 use crate::vst::{
     BusDirection, CString, CtrlNumber, KnobMode, MediaType, ParamID, ParamValue, String128, TChar,
 };
@@ -64,9 +65,9 @@ pub trait IComponentHandler: IUnknown {
 /// Edit controller component interface.
 #[com_interface("DCD7BBE3-7742-448D-A874-AACC979C759E")]
 pub trait IEditController: IPluginBase {
-    unsafe fn set_component_state(&self, state: *mut c_void) -> tresult;
-    unsafe fn set_state(&self, state: *mut c_void) -> tresult;
-    unsafe fn get_state(&self, state: *mut c_void) -> tresult;
+    unsafe fn set_component_state(&self, state: VstPtr<dyn IBStream>) -> tresult;
+    unsafe fn set_state(&self, state: VstPtr<dyn IBStream>) -> tresult;
+    unsafe fn get_state(&self, state: VstPtr<dyn IBStream>) -> tresult;
     unsafe fn get_parameter_count(&self) -> i32;
     unsafe fn get_parameter_info(&self, param_index: i32, info: *mut ParameterInfo) -> tresult;
     unsafe fn get_param_string_by_value(
@@ -85,7 +86,7 @@ pub trait IEditController: IPluginBase {
     unsafe fn plain_param_to_normalized(&self, id: u32, plain_value: f64) -> f64;
     unsafe fn get_param_normalized(&self, id: u32) -> f64;
     unsafe fn set_param_normalized(&self, id: u32, value: f64) -> tresult;
-    unsafe fn set_component_handler(&self, handler: *mut c_void) -> tresult;
+    unsafe fn set_component_handler(&self, handler: VstPtr<dyn IComponentHandler>) -> tresult;
     unsafe fn create_view(&self, name: FIDString) -> *mut c_void;
 }
 
diff --git a/src/vst/ivstprocesscontext.rs b/src/vst/ivstprocesscontext.rs
index 0b1d8ce..910340a 100644
--- a/src/vst/ivstprocesscontext.rs
+++ b/src/vst/ivstprocesscontext.rs
@@ -25,6 +25,9 @@ pub struct ProcessContext {
     pub bar_position_music: f64,
     pub cycle_start_music: f64,
     pub cycle_end_music: f64,
+    pub tempo: f64,
+    pub time_sig_num: i32,
+    pub time_sig_den: i32,
     pub chord: Chord,
     pub smpte_offset_subframes: i32,
     pub frame_rate: FrameRate,

From b4e3ec3b34aa1948cfd8e40d56ff48ecb8915b1b Mon Sep 17 00:00:00 2001
From: m-hilgendorf <mike@hilgendorf.audio>
Date: Sat, 22 Aug 2020 11:56:27 -0700
Subject: [PATCH 3/6] fix for bad merge

---
 src/vst/ivsteditcontroller.rs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/vst/ivsteditcontroller.rs b/src/vst/ivsteditcontroller.rs
index 6b96365..da876e4 100644
--- a/src/vst/ivsteditcontroller.rs
+++ b/src/vst/ivsteditcontroller.rs
@@ -1,4 +1,4 @@
-use crate::base::{tresult, FIDString, IBStream, IPluginBase, TBool};
+use crate::base::{tchar, tresult, FIDString, IBStream, IPluginBase, TBool};
 use crate::utils::VstPtr;
 use crate::vst::{
     BusDirection, CString, CtrlNumber, KnobMode, MediaType, ParamID, ParamValue, String128, TChar,

From 3524566bea73e32fcc8bd3677fe6fd556bd0aedd Mon Sep 17 00:00:00 2001
From: m-hilgendorf <mike@hilgendorf.audio>
Date: Sat, 22 Aug 2020 12:07:04 -0700
Subject: [PATCH 4/6] Removed some redundancy in definitions

---
 src/vst/ivstaudioprocessor.rs        |  2 +-
 src/vst/ivstparameterfunctionname.rs | 16 ++++++++--------
 2 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/src/vst/ivstaudioprocessor.rs b/src/vst/ivstaudioprocessor.rs
index 1722724..c571cd3 100644
--- a/src/vst/ivstaudioprocessor.rs
+++ b/src/vst/ivstaudioprocessor.rs
@@ -96,7 +96,7 @@ pub trait IAudioPresentationLatency: IUnknown {
 /// plan to support > 3.7.0 hosts.
 #[allow(non_snake_case)]
 pub mod IProcessContextRequirementsFlags {
-    pub const kNeedSystemTime: u32 = 1 << 0;
+    pub const kNeedSystemTime: u32 = 1;
     pub const kNeedContinousTimeSamples: u32 = 1 << 1;
     pub const kNeedProjectTimeMusic: u32 = 1 << 2;
     pub const kNeedBarPositionMusic: u32 = 1 << 3;
diff --git a/src/vst/ivstparameterfunctionname.rs b/src/vst/ivstparameterfunctionname.rs
index e512eff..5dd120f 100644
--- a/src/vst/ivstparameterfunctionname.rs
+++ b/src/vst/ivstparameterfunctionname.rs
@@ -5,14 +5,14 @@ use vst3_com::interfaces::iunknown::IUnknown;
 
 #[allow(non_snake_case)]
 pub mod FunctionNameType {
-    pub const kStringStereoTRS: &[u8; 8usize] = b"Trl Trr\0";
-    pub const kCompGainReduction: &'static [u8] = b"Comp:GainReduction\0";
-    pub const kCompGainReductionMax: &'static [u8] = b"Comp:GainReductionMax\0";
-    pub const kCompGainReductionPeakHold: &'static [u8] = b"Comp:GainReductionPeakHold\0";
-    pub const kCompResetGainReductionMax: &'static [u8] = b"Comp:ResetGainReductionMax\0";
-    pub const kLowLatencyMode: &'static [u8] = b"LowLatencyMode\0";
-    pub const kRandomize: &'static [u8] = b"Randomize\0";
-    pub const kWetDryMix: &'static [u8] = b"WetDryMix\0";
+    pub const kStringStereoTRS: &[u8] = b"Trl Trr\0";
+    pub const kCompGainReduction: &[u8] = b"Comp:GainReduction\0";
+    pub const kCompGainReductionMax: &[u8] = b"Comp:GainReductionMax\0";
+    pub const kCompGainReductionPeakHold: &[u8] = b"Comp:GainReductionPeakHold\0";
+    pub const kCompResetGainReductionMax: &[u8] = b"Comp:ResetGainReductionMax\0";
+    pub const kLowLatencyMode: &[u8] = b"LowLatencyMode\0";
+    pub const kRandomize: &[u8] = b"Randomize\0";
+    pub const kWetDryMix: &[u8] = b"WetDryMix\0";
 }
 
 #[com_interface("6D21E1DC-9119-9D4B-A2A0-2FEF6C1AE55C")]

From 1058272adfef89d79c395813085688f4102e375f Mon Sep 17 00:00:00 2001
From: m-hilgendorf <mike@hilgendorf.audio>
Date: Sat, 22 Aug 2020 12:51:18 -0700
Subject: [PATCH 5/6] added a timeout to the validator CI

---
 .github/workflows/ci.yml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 15d1cb4..5f625a2 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -36,6 +36,7 @@ jobs:
     runs-on: ${{ matrix.os }}
     name: validate
     steps:
+      timeout-minutes: 10
       - uses: actions/checkout@v2
       - uses: actions-rs/toolchain@v1
         with:

From 882732fc1d2ff7070d48c68cb6472c5d7a4306ce Mon Sep 17 00:00:00 2001
From: m-hilgendorf <mike@hilgendorf.audio>
Date: Sat, 22 Aug 2020 12:53:12 -0700
Subject: [PATCH 6/6] .

---
 .github/workflows/ci.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 5f625a2..08331d5 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -35,8 +35,8 @@ jobs:
         plugin: [again, passthru]
     runs-on: ${{ matrix.os }}
     name: validate
+    timeout-minutes: 10
     steps:
-      timeout-minutes: 10
       - uses: actions/checkout@v2
       - uses: actions-rs/toolchain@v1
         with:
