Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(505)

Unified Diff: include/opus_defines.h

Issue 12388030: Update Opus to 1.0.2. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/opus
Patch Set: Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « include/opus.h ('k') | include/opus_multistream.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/opus_defines.h
diff --git a/include/opus_defines.h b/include/opus_defines.h
index 82a5f06bb1e65c705ab2348e4c0b6f37081110db..cdde061a567323fd5ebb75a6caf1e279a88f2409 100644
--- a/include/opus_defines.h
+++ b/include/opus_defines.h
@@ -63,20 +63,18 @@ extern "C" {
/** @cond OPUS_INTERNAL_DOC */
/**Export control for opus functions */
-#if !defined(OPUS_EXPORT)
-
-#if defined(__GNUC__) && defined(OPUS_BUILD)
-# define OPUS_EXPORT __attribute__ ((visibility ("default")))
-#elif defined(WIN32) && !defined(__MINGW32__)
-# ifdef OPUS_BUILD
+#ifndef OPUS_EXPORT
+# if defined(__GNUC__) && defined(OPUS_BUILD)
+# define OPUS_EXPORT __attribute__ ((visibility ("default")))
+# elif defined(WIN32) && !defined(__MINGW32__)
+# ifdef OPUS_BUILD
# define OPUS_EXPORT __declspec(dllexport)
-# else
+# else
# define OPUS_EXPORT
+# endif
+# else
+# define OPUS_EXPORT
# endif
-#else
-# define OPUS_EXPORT
-#endif
-
#endif
# if !defined(OPUS_GNUC_PREREQ)
@@ -147,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)))
@@ -505,6 +507,24 @@ extern "C" {
* </dl>
* @hideinitializer */
#define OPUS_GET_DTX(x) OPUS_GET_DTX_REQUEST, __opus_check_int_ptr(x)
+/** Configures the depth of signal being encoded.
+ * This is a hint which helps the encoder identify silence and near-silence.
+ * @see OPUS_GET_LSB_DEPTH
+ * @param[in] x <tt>opus_int32</tt>: Input precision in bits, between 8 and 24
+ * (default: 24).
+ * @hideinitializer */
+#define OPUS_SET_LSB_DEPTH(x) OPUS_SET_LSB_DEPTH_REQUEST, __opus_check_int(x)
+/** Gets the encoder's configured signal depth.
+ * @see OPUS_SET_LSB_DEPTH
+ * @param[out] x <tt>opus_int32 *</tt>: Input precision in bits, between 8 and
+ * 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
@@ -584,19 +604,6 @@ extern "C" {
* @hideinitializer */
#define OPUS_GET_BANDWIDTH(x) OPUS_GET_BANDWIDTH_REQUEST, __opus_check_int_ptr(x)
-/** Configures the depth of signal being encoded.
- * This is a hint which helps the encoder identify silence and near-silence.
- * @see OPUS_GET_LSB_DEPTH
- * @param[in] x <tt>opus_int32</tt>: Input precision in bits, between 8 and 24
- * (default: 24).
- * @hideinitializer */
-#define OPUS_SET_LSB_DEPTH(x) OPUS_SET_LSB_DEPTH_REQUEST, __opus_check_int(x)
-/** Gets the encoder's configured signal depth.
- * @see OPUS_SET_LSB_DEPTH
- * @param[out] x <tt>opus_int32 *</tt>: Input precision in bits, between 8 and
- * 24 (default: 24).
- * @hideinitializer */
-#define OPUS_GET_LSB_DEPTH(x) OPUS_GET_LSB_DEPTH_REQUEST, __opus_check_int_ptr(x)
/**@}*/
/** @defgroup opus_decoderctls Decoder related CTLs
« no previous file with comments | « include/opus.h ('k') | include/opus_multistream.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698