summaryrefslogtreecommitdiffstats
path: root/apps/codecs/libspeex/misc.h
diff options
context:
space:
mode:
Diffstat (limited to 'apps/codecs/libspeex/misc.h')
-rw-r--r--apps/codecs/libspeex/misc.h28
1 files changed, 21 insertions, 7 deletions
diff --git a/apps/codecs/libspeex/misc.h b/apps/codecs/libspeex/misc.h
index 1d6c6cb49f..1664aaed9d 100644
--- a/apps/codecs/libspeex/misc.h
+++ b/apps/codecs/libspeex/misc.h
@@ -38,9 +38,9 @@
#ifndef SPEEX_VERSION
#define SPEEX_MAJOR_VERSION 1 /**< Major Speex version. */
#define SPEEX_MINOR_VERSION 1 /**< Minor Speex version. */
-#define SPEEX_MICRO_VERSION 13 /**< Micro Speex version. */
+#define SPEEX_MICRO_VERSION 14 /**< Micro Speex version. */
#define SPEEX_EXTRA_VERSION "" /**< Extra Speex version. */
-#define SPEEX_VERSION "speex-1.2beta1" /**< Speex version string. */
+#define SPEEX_VERSION "speex-1.2beta2" /**< Speex version string. */
#endif
/* A couple test to catch stupid option combinations */
@@ -75,10 +75,21 @@
void print_vec(float *vec, int len, char *name);
#endif
-/** Convert big endian */
-spx_uint32_t be_int(spx_uint32_t i);
/** Convert little endian */
-spx_uint32_t le_int(spx_uint32_t i);
+static inline spx_int32_t le_int(spx_int32_t i)
+{
+#if !defined(__LITTLE_ENDIAN__) && ( defined(WORDS_BIGENDIAN) || defined(__BIG_ENDIAN__) )
+ spx_uint32_t ui, ret;
+ ui = i;
+ ret = ui>>24;
+ ret |= (ui>>8)&0x0000ff00;
+ ret |= (ui<<8)&0x00ff0000;
+ ret |= (ui<<24);
+ return ret;
+#else
+ return i;
+#endif
+}
/** Speex wrapper for calloc. To do your own dynamic allocation, all you need to do is replace this function, speex_realloc and speex_free */
void *speex_alloc (int size);
@@ -98,15 +109,18 @@ void speex_free_scratch (void *ptr);
/** Speex wrapper for mem_move */
void *speex_move (void *dest, void *src, int n);
-/** Print error message to stderr */
+/** Abort with an error message to stderr (internal Speex error) */
void speex_error(const char *str);
-/** Print warning message to stderr */
+/** Print warning message to stderr (programming error) */
void speex_warning(const char *str);
/** Print warning message with integer argument to stderr */
void speex_warning_int(const char *str, int val);
+/** Print notification message to stderr */
+void speex_notify(const char *str);
+
/** Generate a random number */
spx_word16_t speex_rand(spx_word16_t std, spx_int32_t *seed);