Encoder

Trait Encoder 

Source
pub trait Encoder: Send + Sync {
    // Required methods
    fn encode(&mut self, samples: &[Sample]) -> Vec<u8> ;
    fn sample_rate(&self) -> u32;
    fn channels(&self) -> u16;
}

Required Methods§

Source

fn encode(&mut self, samples: &[Sample]) -> Vec<u8>

Encode PCM samples into codec-specific format

Source

fn sample_rate(&self) -> u32

Get the sample rate expected for input samples

Source

fn channels(&self) -> u16

Get the number of channels expected for input

Implementors§