pub enum HostCommand {
Show 16 variants
LoadPlugin {
path: String,
sample_rate: f64,
block_size: u32,
tempo: f64,
time_sig_numerator: i32,
time_sig_denominator: i32,
},
UnloadPlugin,
CreateGui,
CloseGui,
StartProcessing,
StopProcessing,
SetParameter {
id: u32,
value: f64,
},
SetParameterAt {
id: u32,
value: f64,
offset: i32,
},
GetParameter {
id: u32,
},
GetAllParameters,
FormatParameter {
id: u32,
normalized: f64,
},
SendMidi {
event: MidiEvent,
},
Process {
inputs: Vec<Vec<f32>>,
frames: u32,
},
SaveState,
LoadState {
data: Vec<u8>,
},
Shutdown,
}Expand description
Commands that can be sent to the isolated plugin process.
This enum is the single source of truth for the isolation IPC protocol — the helper binary imports it from here rather than redefining it, so the two halves can never drift apart.
Variants§
LoadPlugin
Load a plugin from the specified path, configured for the given audio settings.
Fields
UnloadPlugin
Unload the current plugin
CreateGui
Create plugin GUI
CloseGui
Close plugin GUI
StartProcessing
Start the plugin’s audio processing.
StopProcessing
Stop the plugin’s audio processing.
SetParameter
Set a parameter (normalized 0.0..=1.0).
SetParameterAt
Schedule a parameter change at a sample offset within the next process block.
Fields
GetParameter
Read a parameter’s current normalized value.
GetAllParameters
Read all parameters.
FormatParameter
Ask the plugin to format a normalized value as a display string.
SendMidi
Send a MIDI event to the plugin.
Process
Process one block of audio. inputs is per-channel; frames is the block length.
Fields
SaveState
Serialize the plugin’s current state to an opaque byte blob.
LoadState
Restore the plugin’s state from a blob previously returned by SaveState.
Shutdown
Shutdown the helper process
Trait Implementations§
Source§impl Clone for HostCommand
impl Clone for HostCommand
Source§fn clone(&self) -> HostCommand
fn clone(&self) -> HostCommand
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more