pub struct SpeexDecoder<T: CoderMode> {
pub mode: &'static SpeexMode,
/* private fields */
}Expand description
A struct representing a speex decoder.
Fields§
§mode: &'static SpeexModeImplementations§
Source§impl<T: CoderMode> SpeexDecoder<T>
impl<T: CoderMode> SpeexDecoder<T>
Sourcepub fn set_enhancement(&mut self, state: bool)
pub fn set_enhancement(&mut self, state: bool)
Set whether to use enhancement.
Sourcepub fn get_enhancement(&mut self) -> bool
pub fn get_enhancement(&mut self) -> bool
Get whether enhancement is turned on or not.
Sourcepub fn decode(
&mut self,
bits: &mut SpeexBits<'_>,
out: &mut [f32],
) -> Result<(), DecoderError>
pub fn decode( &mut self, bits: &mut SpeexBits<'_>, out: &mut [f32], ) -> Result<(), DecoderError>
Decode one frame of speex data from the bitstream
Sourcepub fn decode_to_owned(
&mut self,
bits: &mut SpeexBits<'_>,
) -> Result<Vec<f32>, DecoderError>
pub fn decode_to_owned( &mut self, bits: &mut SpeexBits<'_>, ) -> Result<Vec<f32>, DecoderError>
Decode one frame of speex data from the bitstream into a new Vec
Source§impl SpeexDecoder<NbMode>
impl SpeexDecoder<NbMode>
Sourcepub fn new() -> SpeexDecoder<NbMode>
pub fn new() -> SpeexDecoder<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 SpeexDecoder<WbMode>
impl SpeexDecoder<WbMode>
Sourcepub fn new() -> SpeexDecoder<WbMode>
pub fn new() -> SpeexDecoder<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 SpeexDecoder<UwbMode>
impl SpeexDecoder<UwbMode>
Sourcepub fn new() -> SpeexDecoder<UwbMode>
pub fn new() -> SpeexDecoder<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.
Trait Implementations§
Source§impl<T: CoderMode> ControlFunctions for SpeexDecoder<T>
impl<T: CoderMode> ControlFunctions for SpeexDecoder<T>
Source§unsafe fn ctl(
&mut self,
request: i32,
ptr: *mut c_void,
) -> Result<(), ControlError>
unsafe fn ctl( &mut self, request: i32, ptr: *mut c_void, ) -> Result<(), ControlError>
Calls a control function of the underlying speex library Read more
Source§fn check_error(err_code: i32, param: Option<i32>) -> Result<(), ControlError>
fn check_error(err_code: i32, param: Option<i32>) -> Result<(), ControlError>
Internal function used to convert the error codes returned by the
control function into a result type
Source§fn get_frame_size(&mut self) -> i32
fn get_frame_size(&mut self) -> i32
Gets the frame size (in samples) of the encoder/decoder
Source§fn set_vbr_quality(&mut self, quality: f32)
fn set_vbr_quality(&mut self, quality: f32)
Sets the VBR quality of the encoder/decoder Read more
Source§fn get_vbr_quality(&mut self) -> f32
fn get_vbr_quality(&mut self) -> f32
Gets the VBR quality of the encoder/decoder
Source§fn set_quality(&mut self, quality: i32)
fn set_quality(&mut self, quality: i32)
Sets the overall quality of the encoder/decoder
The value should be between 0 and 10, with 10 being the highest quality.
Default is 8.
Source§fn set_bitrate(&mut self, bitrate: i32)
fn set_bitrate(&mut self, bitrate: i32)
Sets the current bitrate of the encoder/decoder
Source§fn get_bitrate(&mut self) -> i32
fn get_bitrate(&mut self) -> i32
Gets the current bitrate of the encoder/decoder
Source§fn set_sampling_rate(&mut self, samplingrate: i32)
fn set_sampling_rate(&mut self, samplingrate: i32)
Sets the sampling rate used for bitrate computation
Source§fn get_sampling_rate(&mut self) -> i32
fn get_sampling_rate(&mut self) -> i32
Gets the sampling rate used for bitrate computation
Source§fn reset_state(&mut self)
fn reset_state(&mut self)
resets the encoder/decoder memories to zero
Source§fn set_submode_encoding(&mut self, submode: bool)
fn set_submode_encoding(&mut self, submode: bool)
Sets whether submode encoding is done in each frame Read more
Source§fn get_submode_encoding(&mut self) -> bool
fn get_submode_encoding(&mut self) -> bool
Gets whether submode encoding is enabled or not
Source§fn get_lookahead(&mut self) -> i32
fn get_lookahead(&mut self) -> i32
Gets the lookahead value currently in use by the encoder/decoder Read more
Source§fn set_plc_tuning(&mut self, tuning: i32)
fn set_plc_tuning(&mut self, tuning: i32)
Sets tuning for Packet-Loss Concealment (expected loss rate)
Source§fn get_plc_tuning(&mut self) -> i32
fn get_plc_tuning(&mut self) -> i32
Gets current Packet-Loss Concealment tuning value
Source§fn set_vbr_max_bitrate(&mut self, max_bitrate: i32)
fn set_vbr_max_bitrate(&mut self, max_bitrate: i32)
Sets the max bit-rate allowed in VBR mode
Source§fn get_vbr_max_bitrate(&mut self) -> i32
fn get_vbr_max_bitrate(&mut self) -> i32
Gets the max bit-rate allowed in VBR mode
Source§fn set_highpass(&mut self, highpass: bool)
fn set_highpass(&mut self, highpass: bool)
Enables or disables highpass filtering of the input/output
Source§fn get_highpass(&mut self) -> bool
fn get_highpass(&mut self) -> bool
Gets whether highpass filtering of the input/output is enabled
Source§impl Default for SpeexDecoder<NbMode>
impl Default for SpeexDecoder<NbMode>
Source§impl Default for SpeexDecoder<UwbMode>
impl Default for SpeexDecoder<UwbMode>
Source§impl Default for SpeexDecoder<WbMode>
impl Default for SpeexDecoder<WbMode>
Auto Trait Implementations§
impl<T> Freeze for SpeexDecoder<T>
impl<T> RefUnwindSafe for SpeexDecoder<T>where
T: RefUnwindSafe,
impl<T> !Send for SpeexDecoder<T>
impl<T> !Sync for SpeexDecoder<T>
impl<T> Unpin for SpeexDecoder<T>where
T: Unpin,
impl<T> UnwindSafe for SpeexDecoder<T>where
T: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more