2022-02-01 05:45:11 +11:00
|
|
|
//! Different contexts the plugin can use to make callbacks to the host in different...contexts.
|
|
|
|
|
2022-04-22 05:26:52 +10:00
|
|
|
use std::fmt::Display;
|
|
|
|
|
2022-10-22 23:19:10 +11:00
|
|
|
pub mod gui;
|
|
|
|
pub mod init;
|
|
|
|
pub mod process;
|
2022-02-06 02:30:33 +11:00
|
|
|
|
2022-04-22 05:26:52 +10:00
|
|
|
/// The currently active plugin API. This may be useful to display in an about screen in the
|
|
|
|
/// plugin's GUI for debugging purposes.
|
|
|
|
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
|
|
|
pub enum PluginApi {
|
|
|
|
Clap,
|
2022-04-23 02:29:00 +10:00
|
|
|
Standalone,
|
2022-04-22 05:26:52 +10:00
|
|
|
Vst3,
|
|
|
|
}
|
|
|
|
|
|
|
|
impl Display for PluginApi {
|
|
|
|
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
|
|
|
match self {
|
|
|
|
PluginApi::Clap => write!(f, "CLAP"),
|
2022-04-23 02:29:00 +10:00
|
|
|
PluginApi::Standalone => write!(f, "standalone"),
|
2022-04-22 05:26:52 +10:00
|
|
|
PluginApi::Vst3 => write!(f, "VST3"),
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|