pub struct G722Decoder { /* private fields */ }Implementations§
Source§impl G722Decoder
impl G722Decoder
pub fn new() -> Self
pub fn with_options(rate: Bitrate, packed: bool, eight_k: bool) -> Self
Sourcepub fn decode_frame_into(
&mut self,
data: &[u8],
out: &mut [Sample],
) -> Result<usize, CodecError>
pub fn decode_frame_into( &mut self, data: &[u8], out: &mut [Sample], ) -> Result<usize, CodecError>
Decodes a G.722 frame into the caller-provided buffer.
Returns the number of samples written to out. Returns
CodecError::BufferTooSmall if out cannot accept all decoded
samples.
Sourcepub fn decode_frame(&mut self, data: &[u8]) -> PcmBuf
pub fn decode_frame(&mut self, data: &[u8]) -> PcmBuf
Decodes a G.722 frame into a freshly-allocated Vec.
Only available with the std feature.
Trait Implementations§
Source§impl Decoder for G722Decoder
impl Decoder for G722Decoder
Source§fn decode_into(
&mut self,
data: &[u8],
out: &mut [Sample],
) -> Result<usize, CodecError>
fn decode_into( &mut self, data: &[u8], out: &mut [Sample], ) -> Result<usize, CodecError>
Source§fn max_decode_samples(&self, n_bytes: usize) -> usize
fn max_decode_samples(&self, n_bytes: usize) -> usize
Upper bound on the number of samples that
decode_into will write
for an input of n_bytes bytes.Source§fn sample_rate(&self) -> u32
fn sample_rate(&self) -> u32
Get the sample rate of the decoded audio.
Auto Trait Implementations§
impl Freeze for G722Decoder
impl RefUnwindSafe for G722Decoder
impl Send for G722Decoder
impl Sync for G722Decoder
impl Unpin for G722Decoder
impl UnsafeUnpin for G722Decoder
impl UnwindSafe for G722Decoder
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