summaryrefslogtreecommitdiff
path: root/apps/codecs/libspeex/misc.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/codecs/libspeex/misc.c')
-rw-r--r--apps/codecs/libspeex/misc.c39
1 files changed, 14 insertions, 25 deletions
diff --git a/apps/codecs/libspeex/misc.c b/apps/codecs/libspeex/misc.c
index a0a6e3da37..ae6869781d 100644
--- a/apps/codecs/libspeex/misc.c
+++ b/apps/codecs/libspeex/misc.c
@@ -63,30 +63,6 @@ long long spx_mips=0;
63#endif 63#endif
64 64
65 65
66spx_uint32_t be_int(spx_uint32_t i)
67{
68 spx_uint32_t ret=i;
69#ifndef WORDS_BIGENDIAN
70 ret = i>>24;
71 ret += (i>>8)&0x0000ff00;
72 ret += (i<<8)&0x00ff0000;
73 ret += (i<<24);
74#endif
75 return ret;
76}
77
78spx_uint32_t le_int(spx_uint32_t i)
79{
80 spx_uint32_t ret=i;
81#ifdef WORDS_BIGENDIAN
82 ret = i>>24;
83 ret += (i>>8)&0x0000ff00;
84 ret += (i<<8)&0x00ff0000;
85 ret += (i<<24);
86#endif
87 return ret;
88}
89
90#ifndef OVERRIDE_SPEEX_ALLOC 66#ifndef OVERRIDE_SPEEX_ALLOC
91void *speex_alloc (int size) 67void *speex_alloc (int size)
92{ 68{
@@ -132,7 +108,7 @@ void *speex_move (void *dest, void *src, int n)
132#ifndef OVERRIDE_SPEEX_ERROR 108#ifndef OVERRIDE_SPEEX_ERROR
133void speex_error(const char *str) 109void speex_error(const char *str)
134{ 110{
135 fprintf (stderr, "Fatal error: %s\n", str); 111 fprintf (stderr, "Fatal (internal) error: %s\n", str);
136 exit(1); 112 exit(1);
137} 113}
138#endif 114#endif
@@ -140,14 +116,27 @@ void speex_error(const char *str)
140#ifndef OVERRIDE_SPEEX_WARNING 116#ifndef OVERRIDE_SPEEX_WARNING
141void speex_warning(const char *str) 117void speex_warning(const char *str)
142{ 118{
119#ifndef DISABLE_WARNINGS
143 fprintf (stderr, "warning: %s\n", str); 120 fprintf (stderr, "warning: %s\n", str);
121#endif
144} 122}
145#endif 123#endif
146 124
147#ifndef OVERRIDE_SPEEX_WARNING_INT 125#ifndef OVERRIDE_SPEEX_WARNING_INT
148void speex_warning_int(const char *str, int val) 126void speex_warning_int(const char *str, int val)
149{ 127{
128#ifndef DISABLE_WARNINGS
150 fprintf (stderr, "warning: %s %d\n", str, val); 129 fprintf (stderr, "warning: %s %d\n", str, val);
130#endif
131}
132#endif
133
134#ifndef OVERRIDE_SPEEX_NOTIFY
135void speex_notify(const char *str)
136{
137#ifndef DISABLE_NOTIFICATIONS
138 fprintf (stderr, "notification: %s\n", str);
139#endif
151} 140}
152#endif 141#endif
153 142