summaryrefslogtreecommitdiff
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 @@
38#ifndef SPEEX_VERSION 38#ifndef SPEEX_VERSION
39#define SPEEX_MAJOR_VERSION 1 /**< Major Speex version. */ 39#define SPEEX_MAJOR_VERSION 1 /**< Major Speex version. */
40#define SPEEX_MINOR_VERSION 1 /**< Minor Speex version. */ 40#define SPEEX_MINOR_VERSION 1 /**< Minor Speex version. */
41#define SPEEX_MICRO_VERSION 13 /**< Micro Speex version. */ 41#define SPEEX_MICRO_VERSION 14 /**< Micro Speex version. */
42#define SPEEX_EXTRA_VERSION "" /**< Extra Speex version. */ 42#define SPEEX_EXTRA_VERSION "" /**< Extra Speex version. */
43#define SPEEX_VERSION "speex-1.2beta1" /**< Speex version string. */ 43#define SPEEX_VERSION "speex-1.2beta2" /**< Speex version string. */
44#endif 44#endif
45 45
46/* A couple test to catch stupid option combinations */ 46/* A couple test to catch stupid option combinations */
@@ -75,10 +75,21 @@
75void print_vec(float *vec, int len, char *name); 75void print_vec(float *vec, int len, char *name);
76#endif 76#endif
77 77
78/** Convert big endian */
79spx_uint32_t be_int(spx_uint32_t i);
80/** Convert little endian */ 78/** Convert little endian */
81spx_uint32_t le_int(spx_uint32_t i); 79static inline spx_int32_t le_int(spx_int32_t i)
80{
81#if !defined(__LITTLE_ENDIAN__) && ( defined(WORDS_BIGENDIAN) || defined(__BIG_ENDIAN__) )
82 spx_uint32_t ui, ret;
83 ui = i;
84 ret = ui>>24;
85 ret |= (ui>>8)&0x0000ff00;
86 ret |= (ui<<8)&0x00ff0000;
87 ret |= (ui<<24);
88 return ret;
89#else
90 return i;
91#endif
92}
82 93
83/** Speex wrapper for calloc. To do your own dynamic allocation, all you need to do is replace this function, speex_realloc and speex_free */ 94/** Speex wrapper for calloc. To do your own dynamic allocation, all you need to do is replace this function, speex_realloc and speex_free */
84void *speex_alloc (int size); 95void *speex_alloc (int size);
@@ -98,15 +109,18 @@ void speex_free_scratch (void *ptr);
98/** Speex wrapper for mem_move */ 109/** Speex wrapper for mem_move */
99void *speex_move (void *dest, void *src, int n); 110void *speex_move (void *dest, void *src, int n);
100 111
101/** Print error message to stderr */ 112/** Abort with an error message to stderr (internal Speex error) */
102void speex_error(const char *str); 113void speex_error(const char *str);
103 114
104/** Print warning message to stderr */ 115/** Print warning message to stderr (programming error) */
105void speex_warning(const char *str); 116void speex_warning(const char *str);
106 117
107/** Print warning message with integer argument to stderr */ 118/** Print warning message with integer argument to stderr */
108void speex_warning_int(const char *str, int val); 119void speex_warning_int(const char *str, int val);
109 120
121/** Print notification message to stderr */
122void speex_notify(const char *str);
123
110/** Generate a random number */ 124/** Generate a random number */
111spx_word16_t speex_rand(spx_word16_t std, spx_int32_t *seed); 125spx_word16_t speex_rand(spx_word16_t std, spx_int32_t *seed);
112 126