opus_decode_float method
- Pointer<
OpusDecoder> st, - Pointer<
Uint8> data, - int len,
- Pointer<
Float> pcm, - int frame_size,
- int decode_fec,
Decode an Opus packet with floating point output.
@param in
st OpusDecoder*: Decoder state
@param in
data char*: Input payload. Use a NULL pointer to indicate packet loss
@param in
len opus_int32: Number of bytes in payload
@param out
pcm float*: Output signal (interleaved if 2 channels). length
is frame_sizechannelssizeof(float)
@param in
frame_size Number of samples per channel of available space in a pcm.
If this is less than the maximum packet duration (120ms; 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 in
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 decoded samples or @ref opus_errorcodes
Implementation
int opus_decode_float(
ffi.Pointer<OpusDecoder> st,
ffi.Pointer<ffi.Uint8> data,
int len,
ffi.Pointer<ffi.Float> pcm,
int frame_size,
int decode_fec,
) {
return _opus_decode_float(st, data, len, pcm, frame_size, decode_fec);
}