opus_packet_get_nb_samples

Function opus_packet_get_nb_samples 

Source
pub unsafe extern "C" fn opus_packet_get_nb_samples(
    packet: *const c_uchar,
    len: opus_int32,
    Fs: opus_int32,
) -> c_int
Expand description

Gets the number of samples of an Opus packet.

§Arguments

  • packet [in] - char*: Opus packet
  • len [in] - opus_int32: Length of packet
  • Fs [in] - opus_int32: Sampling rate in Hz. This must be a multiple of 400, or inaccurate results will be returned.

§Returns

Number of samples @retval OPUS_BAD_ARG Insufficient data was passed to the function @retval OPUS_INVALID_PACKET The compressed data passed is corrupted or of an unsupported type