pub struct Decoder { /* private fields */ }Expand description
An Opus decoder for one stream.
Implementations§
Source§impl Decoder
impl Decoder
Sourcepub fn conceal(
&mut self,
samples_per_frame: usize,
) -> Result<Vec<i16>, OpusError>
pub fn conceal( &mut self, samples_per_frame: usize, ) -> Result<Vec<i16>, OpusError>
Produce a frame’s worth of concealment for a packet that never arrived.
Opus can do this and G.711 cannot, and it is a real part of why an Opus call survives a lossy network better. Feeding the decoder nothing and playing silence instead throws that away: a gap of silence is far more audible than a gap Opus has interpolated across.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Decoder
impl RefUnwindSafe for Decoder
impl Send for Decoder
impl !Sync for Decoder
impl Unpin for Decoder
impl UnsafeUnpin for Decoder
impl UnwindSafe for Decoder
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