shithub: opus

Download patch

ref: d9636c5d1900006674ecb38c0ebe087a85f4cbf1
parent: ae2311455b1bb5e0415a11d8add55e56bf0e9880
author: Jean-Marc Valin <[email protected]>
date: Sun Jul 31 18:29:05 EDT 2011

Add a function to query the Opus version

--- a/configure.ac
+++ b/configure.ac
@@ -9,7 +9,7 @@
 
 OPUS_MAJOR_VERSION=0
 OPUS_MINOR_VERSION=9
-OPUS_MICRO_VERSION=5
+OPUS_MICRO_VERSION=6
 OPUS_EXTRA_VERSION=
 OPUS_VERSION=$OPUS_MAJOR_VERSION.$OPUS_MINOR_VERSION.$OPUS_MICRO_VERSION$OPUS_EXTRA_VERSION
 LIBOPUS_SUFFIX=0
--- a/src/opus.c
+++ b/src/opus.c
@@ -25,6 +25,9 @@
    SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
 
 const char *opus_strerror(int error)
 {
@@ -42,4 +45,9 @@
       return "unknown error";
    else
       return error_strings[-error];
+}
+
+const char *opus_get_version_string(void)
+{
+	return OPUS_VERSION;
 }
--- a/src/opus.h
+++ b/src/opus.h
@@ -220,6 +220,8 @@
 
 OPUS_EXPORT const char *opus_strerror(int error);
 
+OPUS_EXPORT const char *opus_get_version_string(void);
+
 /* For testing purposes: the encoder and decoder state should always be identical after coding a payload */
 OPUS_EXPORT int opus_encoder_get_final_range(OpusEncoder *st);
 OPUS_EXPORT int opus_decoder_get_final_range(OpusDecoder *st);