Function opus_decoder_dred_decode

Source
pub unsafe extern "C" fn opus_decoder_dred_decode(
    st: *mut OpusDecoder,
    dred: *const OpusDRED,
    dred_offset: opus_int32,
    pcm: *mut opus_int16,
    frame_size: opus_int32,
) -> c_int
Expand description

Decode audio from an Opus DRED packet with 16-bit output.

§Arguments

  • st [in] - OpusDecoder*: Decoder state
  • dred [in] - OpusDRED*: DRED state
  • dred_offset [in] - opus_int32: position of the redundancy to decode (in samples before the beginning of the real audio data in the packet).
  • pcm [out] - opus_int16*: Output signal (interleaved if 2 channels). length is frame_sizechannelssizeof(opus_int16)
  • frame_size [in] - Number of samples per channel to decode in pcm. frame_size must be a multiple of 2.5 ms.

§Returns

Number of decoded samples or [opus_errorcodes]