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-04 23:13:46 +0400
committerJean-Marc Valin <jmvalin@jmvalin.ca>2012-12-05 00:17:43 +0400
commit512d849c24b3ae708fb15c86a047c56d2591ab46 (patch)
tree1b728c2b1502dbb0521bf9a6af1e7eeba15fe8f1 /include
parenta5bd4409319614f166a83934baddceed7e6c58b4 (diff)
Implements OPUS_GET_LAST_FRAME_DURATION decoder ctl()
Diffstat (limited to 'include')
-rw-r--r--include/opus_defines.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/include/opus_defines.h b/include/opus_defines.h
index 94755f37..cdde061a 100644
--- a/include/opus_defines.h
+++ b/include/opus_defines.h
@@ -145,10 +145,14 @@ extern "C" {
#define OPUS_GET_FINAL_RANGE_REQUEST 4031
#define OPUS_GET_PITCH_REQUEST 4033
#define OPUS_SET_GAIN_REQUEST 4034
-#define OPUS_GET_GAIN_REQUEST 4045
+#define OPUS_GET_GAIN_REQUEST 4045 /* Should have been 4035 */
#define OPUS_SET_LSB_DEPTH_REQUEST 4036
#define OPUS_GET_LSB_DEPTH_REQUEST 4037
+#define OPUS_GET_LAST_PACKET_DURATION_REQUEST 4039
+
+/* Don't use 4045, it's already taken by OPUS_GET_GAIN_REQUEST */
+
/* Macros to trigger compilation errors when the wrong types are provided to a CTL */
#define __opus_check_int(x) (((void)((x) == (opus_int32)0)), (opus_int32)(x))
#define __opus_check_int_ptr(ptr) ((ptr) + ((ptr) - (opus_int32*)(ptr)))
@@ -516,6 +520,11 @@ extern "C" {
* 24 (default: 24).
* @hideinitializer */
#define OPUS_GET_LSB_DEPTH(x) OPUS_GET_LSB_DEPTH_REQUEST, __opus_check_int_ptr(x)
+
+/** Gets the duration (in samples) of the last packet successfully decoded or concealed.
+ * @param[out] x <tt>opus_int32 *</tt>: Number of samples (at current sampling rate).
+ * @hideinitializer */
+#define OPUS_GET_LAST_PACKET_DURATION(x) OPUS_GET_LAST_PACKET_DURATION_REQUEST, __opus_check_int_ptr(x)
/**@}*/
/** @defgroup opus_genericctls Generic CTLs