Struct Hosted Parameters
pub struct HostedParameters<'a, H: HostHandlers> { /* private fields */ }Expand description
Exclusive main-thread parameter access to a live CLAP instance. Creation/refresh allocate and execute plugin code outside audio callbacks. The borrow prevents cached extensions from outliving or switching instances. No host parameter extension, automatic rescan or automation scheduler is implied.
Implementations§
§impl<'a, H: HostHandlers> HostedParameters<'a, H>
impl<'a, H: HostHandlers> HostedParameters<'a, H>
pub fn new(
instance: &'a mut PluginInstance<H>,
maximum: usize,
) -> Result<Self, HostedParameterError>
pub fn new( instance: &'a mut PluginInstance<H>, maximum: usize, ) -> Result<Self, HostedParameterError>
Inspect at most maximum parameters (1..4096), accepting zero parameters.
pub fn refresh(&mut self) -> Result<(), HostedParameterError>
pub fn refresh(&mut self) -> Result<(), HostedParameterError>
Replace the whole catalogue only after validation succeeds. The consumer decides when a plugin rescan/state change requires refreshing metadata.
pub fn parameters(&self) -> &[HostedParameter]
pub fn parameters(&self) -> &[HostedParameter]
Validated owned metadata in current plugin enumeration order.
pub fn value(&mut self, id: ClapId) -> Result<f64, HostedParameterError>
pub fn value(&mut self, id: ClapId) -> Result<f64, HostedParameterError>
Read a finite, in-range plain value by stable ID; no normalization/scaling.
pub fn set_inactive(
&mut self,
id: ClapId,
value: f64,
output: &mut OutputEvents<'_>,
) -> Result<(), HostedParameterError>
pub fn set_inactive( &mut self, id: ClapId, value: f64, output: &mut OutputEvents<'_>, ) -> Result<(), HostedParameterError>
Send one zero-time global value to an inactive plugin. Caller supplies the
outgoing queue; edits validate before invoking plugin code. This reports
dispatch, not acknowledgement: query value to check resulting state.
Active sample-timed automation belongs to the audio process event stream.