pub struct ChannelMask(/* private fields */);Expand description
WAVE_FORMAT_EXTENSIBLE channel mask (the first 18 Microsoft speaker bits).
The mask is kept separately from ChannelLayout because a 5.1 stream can
use rear or side surrounds, and because files may carry a non-standard but
still meaningful speaker arrangement.
Implementations§
Source§impl ChannelMask
impl ChannelMask
pub const FRONT_LEFT: u32
pub const FRONT_RIGHT: u32
pub const FRONT_CENTER: u32
pub const LFE1: u32
pub const REAR_LEFT: u32
pub const REAR_RIGHT: u32
pub const FRONT_LEFT_CENTER: u32
pub const FRONT_RIGHT_CENTER: u32
pub const REAR_CENTER: u32
pub const SIDE_LEFT: u32
pub const SIDE_RIGHT: u32
pub const TOP_CENTER: u32
pub const TOP_FRONT_LEFT: u32
pub const TOP_FRONT_CENTER: u32
pub const TOP_FRONT_RIGHT: u32
pub const TOP_REAR_LEFT: u32
pub const TOP_REAR_CENTER: u32
pub const TOP_REAR_RIGHT: u32
Sourcepub const fn from_bits(bits: u32) -> Option<Self>
pub const fn from_bits(bits: u32) -> Option<Self>
Parse a WAVE channel mask. Bits outside the standardized 18-bit range are rejected; zero is valid and means “unspecified positions”.
pub const fn bits(self) -> u32
pub const fn channels(self) -> usize
Sourcepub fn positions(self) -> Vec<ChannelPosition>
pub fn positions(self) -> Vec<ChannelPosition>
Return positions in canonical WAVE channel order (least significant mask bit first), matching planar PCM channel order.
pub fn position(self, channel: usize) -> Option<ChannelPosition>
pub fn pan(self) -> Vec<PanInfo>
Trait Implementations§
Source§impl Clone for ChannelMask
impl Clone for ChannelMask
Source§fn clone(&self) -> ChannelMask
fn clone(&self) -> ChannelMask
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 moreimpl Copy for ChannelMask
Source§impl Debug for ChannelMask
impl Debug for ChannelMask
Source§impl Default for ChannelMask
impl Default for ChannelMask
Source§fn default() -> ChannelMask
fn default() -> ChannelMask
Returns the “default value” for a type. Read more
Source§impl Display for ChannelMask
impl Display for ChannelMask
impl Eq for ChannelMask
Source§impl Hash for ChannelMask
impl Hash for ChannelMask
Source§impl PartialEq for ChannelMask
impl PartialEq for ChannelMask
impl StructuralPartialEq for ChannelMask
Auto Trait Implementations§
impl Freeze for ChannelMask
impl RefUnwindSafe for ChannelMask
impl Send for ChannelMask
impl Sync for ChannelMask
impl Unpin for ChannelMask
impl UnsafeUnpin for ChannelMask
impl UnwindSafe for ChannelMask
Blanket Implementations§
impl<T> Any for Twhere
T: Any,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<T> CloneAny for T
impl<T> CloneAny for T
impl<T> CloneAnySend for T
impl<T> CloneAnySendSync for T
impl<T> CloneAnySync for T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
impl<S, T> Duplex<S> for Twhere
T: FromSample<S> + ToSample<S>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more