pub struct AudioInfo {
pub samples: usize,
pub sample_rate: usize,
pub map: ChannelMap,
pub format: Arc<Soniton>,
pub block_len: Option<usize>,
}
Expand description
Audio stream information contained in a frame.
Fields§
§samples: usize
Number of samples.
sample_rate: usize
Sample rate.
map: ChannelMap
Sequence of stream channels.
format: Arc<Soniton>
Audio sample format.
block_len: Option<usize>
Length of one audio block in samples.
None if not present.
Implementations§
Source§impl AudioInfo
impl AudioInfo
Sourcepub fn new(
samples: usize,
sample_rate: usize,
map: ChannelMap,
format: Arc<Soniton>,
block_len: Option<usize>,
) -> Self
pub fn new( samples: usize, sample_rate: usize, map: ChannelMap, format: Arc<Soniton>, block_len: Option<usize>, ) -> Self
Constructs a new AudioInfo
instance.
Sourcepub fn get_sample_rate(&self) -> usize
pub fn get_sample_rate(&self) -> usize
Returns audio sample rate.
Sourcepub fn get_channels_number(&self) -> usize
pub fn get_channels_number(&self) -> usize
Returns the number of channels.
Sourcepub fn get_format(&self) -> Soniton
pub fn get_format(&self) -> Soniton
Returns sample format.
Sourcepub fn get_samples(&self) -> usize
pub fn get_samples(&self) -> usize
Returns number of samples.
Sourcepub fn get_block_len(&self) -> Option<usize>
pub fn get_block_len(&self) -> Option<usize>
Returns one audio block duration in samples.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for AudioInfo
impl RefUnwindSafe for AudioInfo
impl Send for AudioInfo
impl Sync for AudioInfo
impl Unpin for AudioInfo
impl UnwindSafe for AudioInfo
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