pub struct OpusDecoder {
pub last_range: u32,
/* private fields */
}Fields§
§last_range: u32Implementations§
Source§impl OpusDecoder
impl OpusDecoder
pub fn new(sampling_rate: i32, channels: usize) -> Result<Self, &'static str>
Sourcepub fn decode_fec(
&mut self,
packet: &[u8],
frame_size: usize,
output: &mut [f32],
) -> Result<usize, &'static str>
pub fn decode_fec( &mut self, packet: &[u8], frame_size: usize, output: &mut [f32], ) -> Result<usize, &'static str>
Forward-error-correction decode: reconstruct a LOST frame from the LBRR
(low-bitrate redundancy) embedded in the NEXT received packet. Drives
the SILK decoder in FLAG_DECODE_LBRR mode, which self-selects: it decodes
the redundant frame when the packet carries LBRR for it, and falls back
to PLC extrapolation when it doesn’t. CELT-only or multi-frame packets
fall back to plain PLC (no SILK LBRR to recover). After this call the
caller decodes packet normally for the following frame.
pub fn decode( &mut self, input: &[u8], frame_size: usize, output: &mut [f32], ) -> Result<usize, &'static str>
Auto Trait Implementations§
impl Freeze for OpusDecoder
impl RefUnwindSafe for OpusDecoder
impl Send for OpusDecoder
impl Sync for OpusDecoder
impl Unpin for OpusDecoder
impl UnsafeUnpin for OpusDecoder
impl UnwindSafe for OpusDecoder
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