#[repr(transparent)]pub struct BufferFlags(pub i32);Expand description
Status of an audio buffer crossing the APO boundary.
The enum values match the Windows audio engine’s
APO_BUFFER_FLAGS definitions in audioenginebaseapo.h:
| Variant | Value | Meaning |
|---|---|---|
Self::INVALID | 0 | Buffer contents undefined; ignore. |
Self::VALID | 1 | Buffer contains valid audio data. |
Self::SILENT | 2 | Buffer represents pure silence and may be skipped by the APO without producing audible artefacts. |
Defined as a #[repr(transparent)] newtype rather than an enum
so callers can round-trip the raw i32 returned by the audio
engine without panicking on out-of-range values.
Tuple Fields§
§0: i32Implementations§
Source§impl BufferFlags
impl BufferFlags
Sourcepub const SILENT: Self
pub const SILENT: Self
Buffer is entirely silence; the APO is free to skip computation for this buffer.
Sourcepub const fn is_valid(self) -> bool
pub const fn is_valid(self) -> bool
true iff this is exactly Self::VALID.
Sourcepub const fn is_silent(self) -> bool
pub const fn is_silent(self) -> bool
true iff this is exactly Self::SILENT.
Sourcepub const fn is_invalid(self) -> bool
pub const fn is_invalid(self) -> bool
true iff this is exactly Self::INVALID.
Trait Implementations§
Source§impl Clone for BufferFlags
impl Clone for BufferFlags
Source§fn clone(&self) -> BufferFlags
fn clone(&self) -> BufferFlags
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for BufferFlags
impl Debug for BufferFlags
Source§impl Default for BufferFlags
impl Default for BufferFlags
Source§fn default() -> Self
fn default() -> Self
Defaults to Self::INVALID, matching the Windows audio
engine’s APO_BUFFER_FLAGS::default().
Source§impl Hash for BufferFlags
impl Hash for BufferFlags
Source§impl PartialEq for BufferFlags
impl PartialEq for BufferFlags
Source§fn eq(&self, other: &BufferFlags) -> bool
fn eq(&self, other: &BufferFlags) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Copy for BufferFlags
impl Eq for BufferFlags
impl StructuralPartialEq for BufferFlags
Auto Trait Implementations§
impl Freeze for BufferFlags
impl RefUnwindSafe for BufferFlags
impl Send for BufferFlags
impl Sync for BufferFlags
impl Unpin for BufferFlags
impl UnsafeUnpin for BufferFlags
impl UnwindSafe for BufferFlags
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