Struct opus::Encoder
[−]
[src]
pub struct Encoder { // some fields omitted }
An Opus encoder with associated state.
Methods
impl Encoder
[src]
fn new(sample_rate: u32, channels: Channels, mode: CodingMode) -> Result<Encoder>
Create and initialize an encoder.
fn encode(&mut self, input: &[i16], output: &mut [u8]) -> Result<usize>
Encode an Opus frame.
fn encode_float(&mut self, input: &[f32], output: &mut [u8]) -> Result<usize>
Encode an Opus frame from floating point input.
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 encoder's configured bandpass.
fn get_sample_rate(&mut self) -> Result<u32>
Get the samping rate the encoder was intialized with.