Struct rmp3::Audio[][src]

pub struct Audio<'src, 'pcm> { /* fields omitted */ }

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 peeked, 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

impl<'src, 'pcm> Send for Audio<'src, 'pcm>[src]

impl<'src, 'pcm> Sync for Audio<'src, 'pcm>[src]

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]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.