diff options
author | Jean-Marc Valin <jmvalin@jmvalin.ca> | 2012-12-04 15:45:31 -0500 |
---|---|---|
committer | Jean-Marc Valin <jmvalin@jmvalin.ca> | 2012-12-04 15:45:31 -0500 |
commit | d0fd9d4baa84ba11b1e9057987008977b3709607 (patch) | |
tree | c9ee9388e18610cf3699f1202b5b32a83f4cb33b /include/opus.h | |
parent | 512d849c24b3ae708fb15c86a047c56d2591ab46 (diff) | |
download | opus-d0fd9d4baa84ba11b1e9057987008977b3709607.tar.gz |
Implements opus_packet_get_nb_samples()
Diffstat (limited to 'include/opus.h')
-rw-r--r-- | include/opus.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/opus.h b/include/opus.h index 623662d5..847a07c1 100644 --- a/include/opus.h +++ b/include/opus.h @@ -571,6 +571,17 @@ OPUS_EXPORT OPUS_WARN_UNUSED_RESULT int opus_packet_get_nb_channels(const unsign OPUS_EXPORT OPUS_WARN_UNUSED_RESULT int opus_packet_get_nb_frames(const unsigned char packet[], opus_int32 len) OPUS_ARG_NONNULL(1); /** Gets the number of samples of an Opus packet. + * @param [in] packet <tt>char*</tt>: Opus packet + * @param [in] len <tt>opus_int32</tt>: Length of packet + * @param [in] Fs <tt>opus_int32</tt>: Sampling rate in Hz. + * This must be a multiple of 400, or + * inaccurate results will be returned. + * @returns Number of samples + * @retval OPUS_INVALID_PACKET The compressed data passed is corrupted or of an unsupported type + */ +OPUS_EXPORT OPUS_WARN_UNUSED_RESULT int opus_packet_get_nb_samples(const unsigned char packet[], opus_int32 len, opus_int32 Fs) OPUS_ARG_NONNULL(1); + +/** Gets the number of samples of an Opus packet. * @param [in] dec <tt>OpusDecoder*</tt>: Decoder state * @param [in] packet <tt>char*</tt>: Opus packet * @param [in] len <tt>opus_int32</tt>: Length of packet |