From 5a08c27437a2e7d48c10d74ca15574b44376d605 Mon Sep 17 00:00:00 2001 From: Viktor Lazarerv Date: Sun, 12 Feb 2023 16:30:52 +0100 Subject: [PATCH] Add missing conditions related to the "vst3" feature --- src/plugin.rs | 2 ++ src/prelude.rs | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/plugin.rs b/src/plugin.rs index ce90336d..cab10ca8 100644 --- a/src/plugin.rs +++ b/src/plugin.rs @@ -12,6 +12,7 @@ use crate::midi::MidiConfig; use crate::params::Params; use crate::wrapper::clap::features::ClapFeature; use crate::wrapper::state::PluginState; +#[cfg(feature = "vst3")] pub use crate::wrapper::vst3::subcategories::Vst3SubCategory; /// A function that can execute a plugin's [`BackgroundTask`][Plugin::BackgroundTask]s. A plugin can @@ -244,6 +245,7 @@ pub trait ClapPlugin: Plugin { } /// Provides auxiliary metadata needed for a VST3 plugin. +#[cfg(feature = "vst3")] pub trait Vst3Plugin: Plugin { /// The unique class ID that identifies this particular plugin. You can use the /// `*b"fooofooofooofooo"` syntax for this. diff --git a/src/prelude.rs b/src/prelude.rs index 5d2112bf..ddf26572 100644 --- a/src/prelude.rs +++ b/src/prelude.rs @@ -24,10 +24,13 @@ pub use crate::params::range::{FloatRange, IntRange}; pub use crate::params::smoothing::{Smoothable, Smoother, SmoothingStyle}; pub use crate::params::Params; pub use crate::params::{BoolParam, FloatParam, IntParam, Param, ParamFlags}; +#[cfg(feature = "vst3")] +pub use crate::plugin::Vst3Plugin; pub use crate::plugin::{ AuxiliaryBuffers, AuxiliaryIOConfig, BufferConfig, BusConfig, ClapPlugin, Plugin, - PolyModulationConfig, PortNames, ProcessMode, ProcessStatus, TaskExecutor, Vst3Plugin, + PolyModulationConfig, PortNames, ProcessMode, ProcessStatus, TaskExecutor, }; pub use crate::wrapper::clap::features::ClapFeature; pub use crate::wrapper::state::PluginState; +#[cfg(feature = "vst3")] pub use crate::wrapper::vst3::subcategories::Vst3SubCategory;