pub struct SpeexEncoder<T: CoderMode> {
pub mode: &'static SpeexMode,
/* private fields */
}Expand description
A struct representing a speex encoder.
Fields§
§mode: &'static SpeexModeImplementations§
Source§impl<T: CoderMode> SpeexEncoder<T>
impl<T: CoderMode> SpeexEncoder<T>
Sourcepub fn set_complexity(&mut self, complexity: i32)
pub fn set_complexity(&mut self, complexity: i32)
Sets the analysis complexity of the encoder.
Sourcepub fn get_complexity(&mut self) -> i32
pub fn get_complexity(&mut self) -> i32
Gets the analysis complexity of the encoder.
Sourcepub fn encode(&mut self, input: &mut [f32], bits: &mut SpeexBits<'_>)
pub fn encode(&mut self, input: &mut [f32], bits: &mut SpeexBits<'_>)
Encode one frame of audio into the given bits.
Sourcepub fn encode_int(&mut self, input: &mut [i16], bits: &mut SpeexBits<'_>)
pub fn encode_int(&mut self, input: &mut [i16], bits: &mut SpeexBits<'_>)
Encode one frame of audio into the given bits, using an integer representation.
Source§impl SpeexEncoder<NbMode>
impl SpeexEncoder<NbMode>
Sourcepub fn new() -> SpeexEncoder<NbMode>
pub fn new() -> SpeexEncoder<NbMode>
Create a new narrowband encoder.
Sourcepub fn set_submode(&mut self, submode: NbSubmodeId)
pub fn set_submode(&mut self, submode: NbSubmodeId)
Sets the submode to use for encoding.
Sourcepub fn get_submode(&mut self) -> NbSubmodeId
pub fn get_submode(&mut self) -> NbSubmodeId
Gets the submode currently in use for encoding.
Source§impl SpeexEncoder<WbMode>
impl SpeexEncoder<WbMode>
Sourcepub fn new() -> SpeexEncoder<WbMode>
pub fn new() -> SpeexEncoder<WbMode>
Create a new wideband encoder.
Sourcepub fn set_low_submode(&mut self, low_mode: NbSubmodeId)
pub fn set_low_submode(&mut self, low_mode: NbSubmodeId)
Sets the submode of the narrowband part of the encoder.
Sourcepub fn get_low_submode(&mut self) -> NbSubmodeId
pub fn get_low_submode(&mut self) -> NbSubmodeId
Gets the submode of the narrowband part of the encoder.
Sourcepub fn set_high_submode(&mut self, high_mode: WbSubmodeId)
pub fn set_high_submode(&mut self, high_mode: WbSubmodeId)
Sets the submode of the wideband part of the encoder.
Sourcepub fn get_high_submode(&mut self) -> WbSubmodeId
pub fn get_high_submode(&mut self) -> WbSubmodeId
Gets the submode of the wideband part of the encoder.
Source§impl SpeexEncoder<UwbMode>
impl SpeexEncoder<UwbMode>
Sourcepub fn new() -> SpeexEncoder<UwbMode>
pub fn new() -> SpeexEncoder<UwbMode>
Create a new ultra-wideband encoder.
Sourcepub fn set_low_submode(&mut self, low_mode: NbSubmodeId)
pub fn set_low_submode(&mut self, low_mode: NbSubmodeId)
Sets the submode of the narrowband part of the encoder.
Sourcepub fn get_low_submode(&mut self) -> NbSubmodeId
pub fn get_low_submode(&mut self) -> NbSubmodeId
Gets the submode of the narrowband part of the encoder.