Struct opus::Decoder
[−]
[src]
pub struct Decoder { /* fields omitted */ }
An Opus decoder with associated state.
Methods
impl Decoder
[src]
fn new(sample_rate: u32, channels: Channels) -> Result<Decoder>
Create and initialize a decoder.
fn decode(&mut self, input: &[u8], output: &mut [i16], fec: bool) -> Result<usize>
Decode an Opus packet.
fn decode_float(&mut self, input: &[u8], output: &mut [f32], fec: bool) -> Result<usize>
Decode an Opus packet with floating point output.
fn get_nb_samples(&self, packet: &[u8]) -> Result<usize>
Get the number of samples of an Opus packet.
fn reset_state(&mut self) -> Result<()>
Reset the codec state to be equivalent to a freshly initialized state.
fn get_final_range(&mut self) -> Result<u32>
Get the final range of the codec's entropy coder.
fn get_bandwidth(&mut self) -> Result<Bandwidth>
Get the decoder's last bandpass.
fn get_sample_rate(&mut self) -> Result<u32>
Get the samping rate the decoder was intialized with.