Skip to main content

PluginInstance

Struct PluginInstance 

Source
pub struct PluginInstance {
    pub id: PluginInstanceId,
    pub descriptor: PluginDescriptor,
    pub status: PluginStatus,
    pub sandbox: SandboxProcess,
    pub presets: PresetBank,
    pub bypassed: bool,
    pub output_gain: f32,
    /* private fields */
}
Expand description

Una instancia completa de un plugin en la DAW.

Combina el bridge (CLAP o VST3), el sandbox, los presets y el estado de automatización.

Fields§

§id: PluginInstanceId§descriptor: PluginDescriptor§status: PluginStatus§sandbox: SandboxProcess§presets: PresetBank§bypassed: bool

Bypass global de la instancia

§output_gain: f32

Volumen de salida [0.0, 2.0]

Implementations§

Source§

impl PluginInstance

Source

pub fn new( id: PluginInstanceId, descriptor: PluginDescriptor, bridge: Box<dyn PluginBridge>, sandbox_config: SandboxConfig, ) -> Self

Source

pub fn activate( &mut self, sample_rate: f64, min_block: usize, max_block: usize, ) -> bool

Activa el plugin para procesamiento de audio.

Source

pub fn deactivate(&mut self)

Source

pub fn is_active(&self) -> bool

Source

pub fn process(&mut self, data: &mut PluginProcessData<'_>) -> bool

Procesa un bloque de audio. Si bypassed, copia input → output directamente. Solo llamar desde el audio thread.

Source

pub fn params(&mut self) -> &[ParamDescriptor]

Devuelve los descriptores de parámetros (cacheados).

Source

pub fn get_param_state(&self) -> ParamState

Source

pub fn set_param_state(&mut self, state: &ParamState)

Source

pub fn save_preset(&mut self, name: impl Into<String>) -> usize

Guarda el estado actual como preset.

Source

pub fn load_preset(&mut self, index: usize) -> bool

Carga un preset por índice.

Source

pub fn has_gui(&self) -> bool

Source

pub fn open_gui(&mut self, parent: *mut c_void) -> bool

Source

pub fn close_gui(&mut self)

Source

pub fn save_state(&self) -> PluginSaveState

Serializa el estado del plugin para guardar en el proyecto.

Source

pub fn load_save_state(&mut self, save: &PluginSaveState) -> bool

Restaura el estado del plugin desde un save state.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.