Struct rmp3::Audio [−][src]
Describes audio samples in a frame.
Implementations
impl<'src, 'pcm> Audio<'src, 'pcm>
[src]
pub fn bitrate(&self) -> u32
[src]
Gets the bitrate of this frame in kb/s.
pub fn channels(&self) -> u16
[src]
Gets the channel count of this frame.
pub fn mpeg_layer(&self) -> u8
[src]
Gets the MPEG layer of this frame.
pub fn sample_rate(&self) -> u32
[src]
Gets the sample rate of this frame in Hz.
pub fn samples(&self) -> &'pcm [Sample]
[src]
Gets the slice of samples in this frame.
Samples are interleaved, so the length is
channels
* sample_count
.
Do not use this to inspect the number of samples, as
if this frame was peek
ed, an empty slice will be given.
pub fn sample_count(&self) -> usize
[src]
Gets the sample count per channel
.
pub fn source(&self) -> &'src [u8]
[src]
Gets the source slice with potential garbage stripped.
Trait Implementations
Auto Trait Implementations
impl<'src, 'pcm> RefUnwindSafe for Audio<'src, 'pcm>
impl<'src, 'pcm> Unpin for Audio<'src, 'pcm>
impl<'src, 'pcm> UnwindSafe for Audio<'src, 'pcm>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,