Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.xiph.org/xiph/opus.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Marc Valin <jmvalin@jmvalin.ca>2012-12-05 00:45:31 +0400
committerJean-Marc Valin <jmvalin@jmvalin.ca>2012-12-05 00:45:31 +0400
commitd0fd9d4baa84ba11b1e9057987008977b3709607 (patch)
treec9ee9388e18610cf3699f1202b5b32a83f4cb33b /include
parent512d849c24b3ae708fb15c86a047c56d2591ab46 (diff)
Implements opus_packet_get_nb_samples()
Diffstat (limited to 'include')
-rw-r--r--include/opus.h11
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