pub struct Handle { /* private fields */ }Expand description
A safe handle around the AudioUnitRenderActionFlags pointer provided by the render
callback.
This type lets a callback provide various hints to the audio unit.
For example: if there is no audio to process, we can insert the OUTPUT_IS_SILENCE flag to
indicate to the audio unit that the buffer does not need to be processed.
Implementations§
Source§impl Handle
impl Handle
Sourcepub fn get(&self) -> ActionFlags
pub fn get(&self) -> ActionFlags
Retrieve the current state of the ActionFlags.
Sourcepub fn intersects(&self, other: ActionFlags) -> bool
pub fn intersects(&self, other: ActionFlags) -> bool
Returns true if there are flags common to both self and other.
Sourcepub fn contains(&self, other: ActionFlags) -> bool
pub fn contains(&self, other: ActionFlags) -> bool
Returns true if all of the flags in other are contained within self.
Sourcepub fn insert(&mut self, other: ActionFlags)
pub fn insert(&mut self, other: ActionFlags)
Insert the specified flags in-place.
Sourcepub fn remove(&mut self, other: ActionFlags)
pub fn remove(&mut self, other: ActionFlags)
Remove the specified flags in-place.
Sourcepub fn toggle(&mut self, other: ActionFlags)
pub fn toggle(&mut self, other: ActionFlags)
Toggles the specified flags in-place.
Sourcepub fn from_ptr(ptr: *mut AudioUnitRenderActionFlags) -> Self
pub fn from_ptr(ptr: *mut AudioUnitRenderActionFlags) -> Self
Wrap the given pointer with a Handle.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Handle
impl RefUnwindSafe for Handle
impl !Sync for Handle
impl Unpin for Handle
impl UnsafeUnpin for Handle
impl UnwindSafe for Handle
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