1
0
Fork 0

Add a reverse DNS ID field to ClapPlugin

This commit is contained in:
Robbert van der Helm 2022-02-28 17:04:39 +01:00
parent 089f1589bf
commit c7f1c46f18
5 changed files with 15 additions and 5 deletions

View file

@ -410,7 +410,9 @@ fn unnormalize_automation_precision(normalized: f32) -> u32 {
- (normalized * (MAX_AUTOMATION_STEP_SIZE - MIN_AUTOMATION_STEP_SIZE) as f32).round() as u32 - (normalized * (MAX_AUTOMATION_STEP_SIZE - MIN_AUTOMATION_STEP_SIZE) as f32).round() as u32
} }
impl ClapPlugin for Diopser {} impl ClapPlugin for Diopser {
const CLAP_ID: &'static str = "nl.robbertvanderhelm.diopser";
}
impl Vst3Plugin for Diopser { impl Vst3Plugin for Diopser {
const VST3_CLASS_ID: [u8; 16] = *b"DiopserPlugRvdH."; const VST3_CLASS_ID: [u8; 16] = *b"DiopserPlugRvdH.";

View file

@ -202,7 +202,9 @@ impl Plugin for Gain {
} }
} }
impl ClapPlugin for Gain {} impl ClapPlugin for Gain {
const CLAP_ID: &'static str = "com.moist-plugins-gmbh.gain";
}
impl Vst3Plugin for Gain { impl Vst3Plugin for Gain {
const VST3_CLASS_ID: [u8; 16] = *b"GainGuiYeahBoyyy"; const VST3_CLASS_ID: [u8; 16] = *b"GainGuiYeahBoyyy";

View file

@ -129,7 +129,9 @@ impl Plugin for Gain {
} }
} }
impl ClapPlugin for Gain {} impl ClapPlugin for Gain {
const CLAP_ID: &'static str = "com.moist-plugins-gmbh.gain";
}
impl Vst3Plugin for Gain { impl Vst3Plugin for Gain {
const VST3_CLASS_ID: [u8; 16] = *b"GainMoistestPlug"; const VST3_CLASS_ID: [u8; 16] = *b"GainMoistestPlug";

View file

@ -176,7 +176,9 @@ impl Plugin for Sine {
} }
} }
impl ClapPlugin for Sine {} impl ClapPlugin for Sine {
const CLAP_ID: &'static str = "com.moist-plugins-gmbh.sine";
}
impl Vst3Plugin for Sine { impl Vst3Plugin for Sine {
const VST3_CLASS_ID: [u8; 16] = *b"SineMoistestPlug"; const VST3_CLASS_ID: [u8; 16] = *b"SineMoistestPlug";

View file

@ -103,7 +103,9 @@ pub trait Plugin: Default + Send + Sync + 'static {
/// Provides auxiliary metadata needed for a CLAP plugin. /// Provides auxiliary metadata needed for a CLAP plugin.
pub trait ClapPlugin: Plugin { pub trait ClapPlugin: Plugin {
// TODO: Add the required fields, just like the [Vst3Plugin] trait /// A unique ID that identifies this particular plugin. This is usually in reverse domain name
/// notation, e.g. `com.manufacturer.plugin-name`.
const CLAP_ID: &'static str;
} }
/// Provides auxiliary metadata needed for a VST3 plugin. /// Provides auxiliary metadata needed for a VST3 plugin.