pub enum AudioChannelLayout {
Mono,
Stereo,
Stereo21,
Surround51,
Surround71,
Unknown,
}Expand description
Speaker layout carried by an Audio value.
Variants§
Mono
One center channel.
Stereo
Left and right channels.
Stereo21
Left, right, and low-frequency-effects channels.
Surround51
5.1 surround channels.
Surround71
7.1 surround channels.
Unknown
The channel count does not determine an unambiguous speaker layout.
Implementations§
Source§impl AudioChannelLayout
impl AudioChannelLayout
Sourcepub const fn channel_count(self) -> Option<usize>
pub const fn channel_count(self) -> Option<usize>
Return the required channel count, or None for an unknown layout.
Sourcepub const fn for_channel_count(channels: usize) -> Self
pub const fn for_channel_count(channels: usize) -> Self
Infer the unambiguous conventional layout for a channel count.
Three channels deliberately remain unknown because the count cannot distinguish L/R/LFE (2.1) from L/C/R (3.0).
Trait Implementations§
Source§impl Clone for AudioChannelLayout
impl Clone for AudioChannelLayout
impl Copy for AudioChannelLayout
Source§impl Debug for AudioChannelLayout
impl Debug for AudioChannelLayout
impl Eq for AudioChannelLayout
Source§impl PartialEq for AudioChannelLayout
impl PartialEq for AudioChannelLayout
impl StructuralPartialEq for AudioChannelLayout
Auto Trait Implementations§
impl Forget for AudioChannelLayout
impl Freeze for AudioChannelLayout
impl Move for AudioChannelLayout
impl RefUnwindSafe for AudioChannelLayout
impl Send for AudioChannelLayout
impl Sync for AudioChannelLayout
impl Unpin for AudioChannelLayout
impl UnsafeUnpin for AudioChannelLayout
impl UnwindSafe for AudioChannelLayout
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