Struct av_data::audiosample::ChannelMap
source · [−]pub struct ChannelMap { /* private fields */ }Expand description
An ordered sequence of channels.
Implementations
sourceimpl ChannelMap
impl ChannelMap
sourcepub fn add_channel(&mut self, ch: ChannelType)
pub fn add_channel(&mut self, ch: ChannelType)
Adds a single channel to the map.
sourcepub fn add_channels(&mut self, chs: &[ChannelType])
pub fn add_channels(&mut self, chs: &[ChannelType])
Adds several channels to the map in order of occurrence.
sourcepub fn get_channel(&self, idx: usize) -> ChannelType
pub fn get_channel(&self, idx: usize) -> ChannelType
Gets the channel type for a requested index.
sourcepub fn find_channel_id(&self, t: ChannelType) -> Option<u8>
pub fn find_channel_id(&self, t: ChannelType) -> Option<u8>
Tries to find the position of a determined type of channel in the map.
sourcepub fn default_map(count: usize) -> Self
pub fn default_map(count: usize) -> Self
Creates a default channel map.
Depending on the count value, the channel map is defined differently.
When count is 1 –> the channel map is composed by a single centered
channel.
When count is 2 –> the channel map is composed by a right and a left
channel respectively.
For other count values, no other implementations are given for now.
Trait Implementations
sourceimpl Clone for ChannelMap
impl Clone for ChannelMap
sourcefn clone(&self) -> ChannelMap
fn clone(&self) -> ChannelMap
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
sourceimpl Debug for ChannelMap
impl Debug for ChannelMap
sourceimpl Default for ChannelMap
impl Default for ChannelMap
sourcefn default() -> ChannelMap
fn default() -> ChannelMap
Returns the “default value” for a type. Read more
sourceimpl PartialEq<ChannelMap> for ChannelMap
impl PartialEq<ChannelMap> for ChannelMap
sourcefn eq(&self, other: &ChannelMap) -> bool
fn eq(&self, other: &ChannelMap) -> bool
This method tests for self and other values to be equal, and is used
by ==. Read more
impl Eq for ChannelMap
impl StructuralEq for ChannelMap
impl StructuralPartialEq for ChannelMap
Auto Trait Implementations
impl RefUnwindSafe for ChannelMap
impl Send for ChannelMap
impl Sync for ChannelMap
impl Unpin for ChannelMap
impl UnwindSafe for ChannelMap
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more