pub struct SilenceMask(pub u64);Expand description
An optional optimization hint on which channels contain all
zeros (silence). The first bit (0x1) is the first channel,
the second bit is the second channel, and so on.
Tuple Fields§
§0: u64Implementations§
Source§impl SilenceMask
impl SilenceMask
Sourcepub const NONE_SILENT: Self
pub const NONE_SILENT: Self
A mask with no channels marked as silent
Sourcepub const MONO_SILENT: Self
pub const MONO_SILENT: Self
A mask with only the first channel marked as silent
Sourcepub const STEREO_SILENT: Self
pub const STEREO_SILENT: Self
A mask with only the first two channels marked as silent
Sourcepub const fn is_channel_silent(&self, i: usize) -> bool
pub const fn is_channel_silent(&self, i: usize) -> bool
Returns true if the channel is marked as silent, false
otherwise.
i must be less than 64.
Sourcepub const fn any_channel_silent(&self, num_channels: usize) -> bool
pub const fn any_channel_silent(&self, num_channels: usize) -> bool
Returns true if any channel is marked as silent, false
otherwise.
num_channels must be less than 64.
Sourcepub const fn all_channels_silent(&self, num_channels: usize) -> bool
pub const fn all_channels_silent(&self, num_channels: usize) -> bool
Returns true if all channels are marked as silent, false
otherwise.
num_channels must be less than 64.
Sourcepub fn set_channel(&mut self, i: usize, silent: bool)
pub fn set_channel(&mut self, i: usize, silent: bool)
Mark/un-mark the given channel as silent.
num_channels must be less than 64.
Trait Implementations§
Source§impl Clone for SilenceMask
impl Clone for SilenceMask
Source§fn clone(&self) -> SilenceMask
fn clone(&self) -> SilenceMask
Returns a copy of the value. Read more
1.0.0 · 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 SilenceMask
impl Debug for SilenceMask
Source§impl Default for SilenceMask
impl Default for SilenceMask
Source§fn default() -> SilenceMask
fn default() -> SilenceMask
Returns the “default value” for a type. Read more
Source§impl PartialEq for SilenceMask
impl PartialEq for SilenceMask
impl Copy for SilenceMask
impl Eq for SilenceMask
impl StructuralPartialEq for SilenceMask
Auto Trait Implementations§
impl Freeze for SilenceMask
impl RefUnwindSafe for SilenceMask
impl Send for SilenceMask
impl Sync for SilenceMask
impl Unpin for SilenceMask
impl UnwindSafe for SilenceMask
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