pub struct AudioChannelMask { /* private fields */ }
Expand description
Mask used to indicate which channels are present in the stream.
See https://en.wikipedia.org/wiki/Surround_sound#Standard_speaker_channels and https://en.wikipedia.org/wiki/22.2_surround_sound for more information.
Implementations§
Source§impl AudioChannelMask
impl AudioChannelMask
Sourcepub const FrontLeft: AudioChannelMask
pub const FrontLeft: AudioChannelMask
Front left
Sourcepub const FrontRight: AudioChannelMask
pub const FrontRight: AudioChannelMask
Front right
Sourcepub const FrontCenter: AudioChannelMask
pub const FrontCenter: AudioChannelMask
Front center
Sourcepub const LowFrequency1: AudioChannelMask
pub const LowFrequency1: AudioChannelMask
Low frequency
Sourcepub const BackLeft: AudioChannelMask
pub const BackLeft: AudioChannelMask
Back left
Sourcepub const BackRight: AudioChannelMask
pub const BackRight: AudioChannelMask
Back right
Sourcepub const FrontLeftCenter: AudioChannelMask
pub const FrontLeftCenter: AudioChannelMask
Front left of center
Sourcepub const FrontRightCenter: AudioChannelMask
pub const FrontRightCenter: AudioChannelMask
Front right of center
Sourcepub const BackCenter: AudioChannelMask
pub const BackCenter: AudioChannelMask
Back center
Sourcepub const SideLeft: AudioChannelMask
pub const SideLeft: AudioChannelMask
Side left
Sourcepub const SideRight: AudioChannelMask
pub const SideRight: AudioChannelMask
Side right
Sourcepub const TopCenter: AudioChannelMask
pub const TopCenter: AudioChannelMask
Top center
Sourcepub const TopFrontLeft: AudioChannelMask
pub const TopFrontLeft: AudioChannelMask
Front left height
Sourcepub const TopFrontCenter: AudioChannelMask
pub const TopFrontCenter: AudioChannelMask
Front center height
Sourcepub const TopFrontRight: AudioChannelMask
pub const TopFrontRight: AudioChannelMask
Front right height
Sourcepub const TopBackLeft: AudioChannelMask
pub const TopBackLeft: AudioChannelMask
Rear left height
Sourcepub const TopBackCenter: AudioChannelMask
pub const TopBackCenter: AudioChannelMask
Rear center height
Sourcepub const TopBackRight: AudioChannelMask
pub const TopBackRight: AudioChannelMask
Rear right height
Sourcepub const LowFrequency2: AudioChannelMask
pub const LowFrequency2: AudioChannelMask
Low frequency 2
Sourcepub const TopSideLeft: AudioChannelMask
pub const TopSideLeft: AudioChannelMask
Top side left
Sourcepub const TopSideRight: AudioChannelMask
pub const TopSideRight: AudioChannelMask
Top side right
Sourcepub const BottomFrontCenter: AudioChannelMask
pub const BottomFrontCenter: AudioChannelMask
Bottom front center
Sourcepub const BottomFrontLeft: AudioChannelMask
pub const BottomFrontLeft: AudioChannelMask
Bottom front left
Sourcepub const BottomFrontRight: AudioChannelMask
pub const BottomFrontRight: AudioChannelMask
Bottom front right
Sourcepub const fn all_bits() -> Self
pub const fn all_bits() -> Self
Returns a bitmask that contains all values.
This will include bits that do not have any flags.
Use ::all_flags()
if you only want to use flags.
Sourcepub const fn is_all_bits(&self) -> bool
pub const fn is_all_bits(&self) -> bool
Returns true
if the bitmask contains all values.
This will check for bits == !0
,
use .is_all_flags()
if you only want to check for all flags
Sourcepub const fn is_all_flags(&self) -> bool
pub const fn is_all_flags(&self) -> bool
Returns true
if the bitmask contains all flags.
This will fail if any unused bit is set,
consider using .truncate()
first.
Sourcepub const fn all() -> Self
👎Deprecated: Please use the ::all_bits()
constructor
pub const fn all() -> Self
::all_bits()
constructorReturns a bitmask that contains all values.
This will include bits that do not have any flags.
Use ::all_flags()
if you only want to use flags.
Sourcepub const fn is_all(&self) -> bool
👎Deprecated: Please use the .is_all_bits()
method
pub const fn is_all(&self) -> bool
.is_all_bits()
methodReturns true
if the bitmask contains all values.
This will check for bits == !0
,
use .is_all_flags()
if you only want to check for all flags
Sourcepub const fn full() -> Self
👎Deprecated: Please use the ::all_flags()
constructor
pub const fn full() -> Self
::all_flags()
constructorReturns a bitmask that contains all flags.
Sourcepub const fn is_full(&self) -> bool
👎Deprecated: Please use the .is_all_flags()
method
pub const fn is_full(&self) -> bool
.is_all_flags()
methodReturns true
if the bitmask contains all flags.
This will fail if any unused bit is set,
consider using .truncate()
first.
Sourcepub const fn truncate(&self) -> Self
pub const fn truncate(&self) -> Self
Returns a bitmask that only has bits corresponding to flags
Sourcepub const fn intersects(&self, other: Self) -> bool
pub const fn intersects(&self, other: Self) -> bool
Returns true
if self
intersects with any value in other
,
or if other
does not contain any values.
This is equivalent to (self & other) != 0 || other == 0
.
Trait Implementations§
Source§impl Binary for AudioChannelMask
impl Binary for AudioChannelMask
Source§impl BitAnd for AudioChannelMask
impl BitAnd for AudioChannelMask
Source§impl BitAndAssign for AudioChannelMask
impl BitAndAssign for AudioChannelMask
Source§fn bitand_assign(&mut self, rhs: Self)
fn bitand_assign(&mut self, rhs: Self)
&=
operation. Read moreSource§impl BitOr for AudioChannelMask
impl BitOr for AudioChannelMask
Source§impl BitOrAssign for AudioChannelMask
impl BitOrAssign for AudioChannelMask
Source§fn bitor_assign(&mut self, rhs: Self)
fn bitor_assign(&mut self, rhs: Self)
|=
operation. Read moreSource§impl BitXor for AudioChannelMask
impl BitXor for AudioChannelMask
Source§impl BitXorAssign for AudioChannelMask
impl BitXorAssign for AudioChannelMask
Source§fn bitxor_assign(&mut self, rhs: Self)
fn bitxor_assign(&mut self, rhs: Self)
^=
operation. Read moreSource§impl Clone for AudioChannelMask
impl Clone for AudioChannelMask
Source§fn clone(&self) -> AudioChannelMask
fn clone(&self) -> AudioChannelMask
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more