Decoder

Trait Decoder 

Source
pub trait Decoder: Send + Sync {
    // Required methods
    fn decode(&mut self, data: &[u8]) -> PcmBuf;
    fn sample_rate(&self) -> u32;
    fn channels(&self) -> u16;
}

Required Methods§

Source

fn decode(&mut self, data: &[u8]) -> PcmBuf

Decode encoded audio data into PCM samples

Source

fn sample_rate(&self) -> u32

Get the sample rate of the decoded audio

Source

fn channels(&self) -> u16

Get the number of channels

Implementors§