[−][src]Function audiopus_sys::opus_multistream_decode
pub unsafe extern "C" fn opus_multistream_decode(
st: *mut OpusMSDecoder,
data: *const c_uchar,
len: opus_int32,
pcm: *mut opus_int16,
frame_size: c_int,
decode_fec: c_int
) -> c_int
Decode a multistream Opus packet.
@param st OpusMSDecoder*: Multistream decoder state.
@param[in] data const unsigned char*: Input payload.
Use a NULL
pointer to indicate packet
loss.
@param len opus_int32: Number of bytes in payload.
@param[out] pcm opus_int16*: Output signal, with interleaved
samples.
This must contain room for
frame_size*channels
samples.
@param frame_size int: The number of samples per channel of
available space in \a pcm.
If this is less than the maximum packet duration
(120 ms; 5760 for 48kHz), this function will not be capable
of decoding some packets. In the case of PLC (data==NULL)
or FEC (decode_fec=1), then frame_size needs to be exactly
the duration of audio that is missing, otherwise the
decoder will not be in the optimal state to decode the
next incoming packet. For the PLC and FEC cases, frame_size
must be a multiple of 2.5 ms.
@param decode_fec int: Flag (0 or 1) to request that any in-band
forward error correction data be decoded.
If no such data is available, the frame is
decoded as if it were lost.
@returns Number of samples decoded on success or a negative error code
(see @ref opus_errorcodes) on failure.