pub struct ChannelConfiguration(/* private fields */);Expand description
A channel configuration as defined in ISO 14496-3.
In ADTS headers the channel_configuration field is 3 bits, covering only
values 0–7. In AudioSpecificConfig (MP4/M4A) the field is 4 bits (0–15),
with values 8–14 defined by later amendments to ISO 14496-3.
This crate provides constants for the original 8 configurations (0–7); callers can define additional constants for the extended layouts as needed.
Implementations§
Source§impl ChannelConfiguration
impl ChannelConfiguration
Sourcepub const OBJECT_TYPE_SPECIFIC_CONFIG: ChannelConfiguration
pub const OBJECT_TYPE_SPECIFIC_CONFIG: ChannelConfiguration
Channel configuration defined by the audio object type specific config.
Sourcepub const MONO: ChannelConfiguration
pub const MONO: ChannelConfiguration
Mono (1 channel).
Sourcepub const STEREO: ChannelConfiguration
pub const STEREO: ChannelConfiguration
Stereo (2 channels).
Sourcepub const THREE: ChannelConfiguration
pub const THREE: ChannelConfiguration
3 channels.
Sourcepub const FOUR: ChannelConfiguration
pub const FOUR: ChannelConfiguration
4 channels.
Sourcepub const FIVE: ChannelConfiguration
pub const FIVE: ChannelConfiguration
5 channels.
Sourcepub const FIVE_ONE: ChannelConfiguration
pub const FIVE_ONE: ChannelConfiguration
5.1 surround (6 channels).
Sourcepub const SEVEN_ONE: ChannelConfiguration
pub const SEVEN_ONE: ChannelConfiguration
7.1 surround (8 channels).
Sourcepub const fn new(value: u8) -> ChannelConfiguration
pub const fn new(value: u8) -> ChannelConfiguration
Creates a ChannelConfiguration from a 4-bit value.
Panics if value is greater than 0xf.
In const context, an invalid value produces a compile-time error.
Trait Implementations§
Source§impl Clone for ChannelConfiguration
impl Clone for ChannelConfiguration
Source§fn clone(&self) -> ChannelConfiguration
fn clone(&self) -> ChannelConfiguration
Returns a duplicate 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 ChannelConfiguration
impl Debug for ChannelConfiguration
Source§impl PartialEq for ChannelConfiguration
impl PartialEq for ChannelConfiguration
Source§impl TryFrom<u8> for ChannelConfiguration
impl TryFrom<u8> for ChannelConfiguration
Source§type Error = ChannelConfigurationError
type Error = ChannelConfigurationError
The type returned in the event of a conversion error.
Source§fn try_from(
value: u8,
) -> Result<ChannelConfiguration, <ChannelConfiguration as TryFrom<u8>>::Error>
fn try_from( value: u8, ) -> Result<ChannelConfiguration, <ChannelConfiguration as TryFrom<u8>>::Error>
Performs the conversion.
impl Copy for ChannelConfiguration
impl Eq for ChannelConfiguration
impl StructuralPartialEq for ChannelConfiguration
Auto Trait Implementations§
impl Freeze for ChannelConfiguration
impl RefUnwindSafe for ChannelConfiguration
impl Send for ChannelConfiguration
impl Sync for ChannelConfiguration
impl Unpin for ChannelConfiguration
impl UnsafeUnpin for ChannelConfiguration
impl UnwindSafe for ChannelConfiguration
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