[][src]Trait audiopus::coder::GenericCtl

pub trait GenericCtl {
    fn final_range(&self) -> Result<u32, Error>;
fn phase_inversion_disabled(&self) -> Result<bool, Error>;
fn set_phase_inversion_disabled(
        &mut self,
        disabled: bool
    ) -> Result<(), Error>;
fn sample_rate(&self) -> Result<SampleRate, Error>;
fn reset_state(&mut self) -> Result<(), Error>; }

A set of methods that both Encoder and Decoder have implemented.

Info: This does not include set_sample_rate as it returns unimplemented on Decoder.

Required methods

fn final_range(&self) -> Result<u32, Error>

fn phase_inversion_disabled(&self) -> Result<bool, Error>

fn set_phase_inversion_disabled(&mut self, disabled: bool) -> Result<(), Error>

fn sample_rate(&self) -> Result<SampleRate, Error>

fn reset_state(&mut self) -> Result<(), Error>

Loading content...

Implementors

impl GenericCtl for Decoder[src]

impl GenericCtl for Encoder[src]

fn final_range(&self) -> Result<u32>[src]

Gets the final state of the codec's entropy coder.

This is used for testing purposes. The encoder state should be identical after coding a payload, assuming no data corruption or software bugs.

fn phase_inversion_disabled(&self) -> Result<bool>[src]

Gets the encoder's configured phase inversion status.

fn set_phase_inversion_disabled(&mut self, disabled: bool) -> Result<()>[src]

If set to true, disables the use of phase inversion for intensity stereo, improving the quality of mono downmixes, but slightly reducing normal stereo quality.

Disabling phase inversion in the decoder does not comply with RFC 6716, although it does not cause any interoperability issue and is expected to become part of the Opus standard once RFC 6716 is updated by draft-ietf-codec-opus-update.

fn sample_rate(&self) -> Result<SampleRate>[src]

Gets the sampling rate the encoder or decoder was initialized with.

This simply returns the Fs value passed to Encoder::new.

fn reset_state(&mut self) -> Result<()>[src]

Resets the codec state to be equivalent to a freshly initialized state.

This should be called when switching streams in order to prevent the back to back decoding from giving different results from one at a time decoding.

Loading content...