pub struct PluginDescriptor {
pub id: PluginId,
pub name: String,
pub vendor: String,
pub version: String,
pub ports: Vec<PortDecl>,
pub parameters: Vec<ParameterDescriptor>,
pub latency_frames: u32,
}Expand description
A plugin’s full static description: identity, metadata, ports, parameters, and reported latency.
Fields§
§id: PluginIdThe plugin’s stable identity.
name: StringThe human-readable plugin name.
vendor: StringThe vendor string.
version: StringThe version string.
ports: Vec<PortDecl>The plugin’s declared audio and event ports.
parameters: Vec<ParameterDescriptor>The plugin’s automatable parameters.
latency_frames: u32The reported processing latency in frames.
Implementations§
Source§impl PluginDescriptor
impl PluginDescriptor
Sourcepub fn new(
id: PluginId,
name: impl Into<String>,
vendor: impl Into<String>,
version: impl Into<String>,
) -> Result<Self>
pub fn new( id: PluginId, name: impl Into<String>, vendor: impl Into<String>, version: impl Into<String>, ) -> Result<Self>
Builds a descriptor with no ports, no parameters, and zero latency.
§Errors
Returns an error when name is empty after trimming.
Sourcepub fn audio_effect(
format: PluginFormat,
stable_id: impl Into<String>,
name: impl Into<String>,
channels: u16,
) -> Result<Self>
pub fn audio_effect( format: PluginFormat, stable_id: impl Into<String>, name: impl Into<String>, channels: u16, ) -> Result<Self>
Builds a stereo-capable audio-effect descriptor with the standard port layout.
Adds channels-wide audio-in/audio-out ports plus single-channel
events-in/events-out ports, and sets the vendor to "sim" and the
version to this crate’s package version.
§Errors
Returns an error when stable_id or name is empty after trimming.
Sourcepub fn with_parameter(self, parameter: ParameterDescriptor) -> Self
pub fn with_parameter(self, parameter: ParameterDescriptor) -> Self
Returns the descriptor with parameter appended to its parameter list.
Sourcepub fn parameter(&self, id: u32) -> Option<&ParameterDescriptor>
pub fn parameter(&self, id: u32) -> Option<&ParameterDescriptor>
Returns the parameter whose ParameterDescriptor::id matches id, if
any.
Trait Implementations§
Source§impl Clone for PluginDescriptor
impl Clone for PluginDescriptor
Source§fn clone(&self) -> PluginDescriptor
fn clone(&self) -> PluginDescriptor
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for PluginDescriptor
impl Debug for PluginDescriptor
Source§impl PartialEq for PluginDescriptor
impl PartialEq for PluginDescriptor
Source§fn eq(&self, other: &PluginDescriptor) -> bool
fn eq(&self, other: &PluginDescriptor) -> bool
self and other values to be equal, and is used by ==.