diff options
author | Jean-Marc Valin <jmvalin@jmvalin.ca> | 2012-12-04 14:13:46 -0500 |
---|---|---|
committer | Jean-Marc Valin <jmvalin@jmvalin.ca> | 2012-12-04 15:17:43 -0500 |
commit | 512d849c24b3ae708fb15c86a047c56d2591ab46 (patch) | |
tree | 1b728c2b1502dbb0521bf9a6af1e7eeba15fe8f1 /include/opus_defines.h | |
parent | a5bd4409319614f166a83934baddceed7e6c58b4 (diff) | |
download | opus-512d849c24b3ae708fb15c86a047c56d2591ab46.tar.gz |
Implements OPUS_GET_LAST_FRAME_DURATION decoder ctl()
Diffstat (limited to 'include/opus_defines.h')
-rw-r--r-- | include/opus_defines.h | 11 |
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 |