pub struct AudioHandle { /* private fields */ }Expand description
A running audio stream driving a Plugin.
Dropping the handle stops playback (the underlying device stream is released).
While it lives, the plugin keeps running on the audio thread; use Self::lock
to send MIDI or change parameters from your control thread.
Implementations§
Source§impl AudioHandle
impl AudioHandle
Sourcepub fn lock(&self) -> MutexGuard<'_, Plugin>
pub fn lock(&self) -> MutexGuard<'_, Plugin>
Lock the running plugin to send MIDI, change parameters, etc.
Recovers automatically if the audio thread previously panicked while holding the lock (poisoned mutex), so control calls keep working.
Auto Trait Implementations§
impl !RefUnwindSafe for AudioHandle
impl !Sync for AudioHandle
impl !UnwindSafe for AudioHandle
impl Freeze for AudioHandle
impl Send for AudioHandle
impl Unpin for AudioHandle
impl UnsafeUnpin for AudioHandle
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