pub struct PluginInfo<'a> { /* private fields */ }
Expand description
Holds various data that is passed from the host at plugin instantiation time.
Implementations§
Source§impl<'a> PluginInfo<'a>
impl<'a> PluginInfo<'a>
Sourcepub unsafe fn from_raw(
plugin_descriptor: *const LV2_Descriptor,
bundle_path: *const c_char,
sample_rate: f64,
) -> Result<Self, PluginInfoError>
pub unsafe fn from_raw( plugin_descriptor: *const LV2_Descriptor, bundle_path: *const c_char, sample_rate: f64, ) -> Result<Self, PluginInfoError>
Create a new plugin info instance from raw information.
§Safety
This method is unsafe since it dereferences raw pointers. It panics when one of the pointers is null, but does not check the pointers for other validity.
Sourcepub fn new(plugin_uri: &'a Uri, bundle_path: &'a Path, sample_rate: f64) -> Self
pub fn new(plugin_uri: &'a Uri, bundle_path: &'a Path, sample_rate: f64) -> Self
Create a new plugin info instance.
Sourcepub fn plugin_uri(&self) -> &Uri
pub fn plugin_uri(&self) -> &Uri
The URI of the plugin that is being instantiated.
Sourcepub fn bundle_path(&self) -> &Path
pub fn bundle_path(&self) -> &Path
The path to the LV2 bundle directory which contains this plugin binary.
This is useful to get if the plugin needs to store extra resources in its bundle directory, such as presets, or any other kind of data.
Sourcepub fn sample_rate(&self) -> f64
pub fn sample_rate(&self) -> f64
The sample rate, in Hz, that is being used by the host. The host will always send audio data to the plugin at this sample rate.
Auto Trait Implementations§
impl<'a> Freeze for PluginInfo<'a>
impl<'a> RefUnwindSafe for PluginInfo<'a>
impl<'a> Send for PluginInfo<'a>
impl<'a> Sync for PluginInfo<'a>
impl<'a> Unpin for PluginInfo<'a>
impl<'a> UnwindSafe for PluginInfo<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more