summaryrefslogtreecommitdiff
path: root/apps/codecs/libspeex/os_support.h
diff options
context:
space:
mode:
authorThom Johansen <thomj@rockbox.org>2007-11-14 02:15:56 +0000
committerThom Johansen <thomj@rockbox.org>2007-11-14 02:15:56 +0000
commit85b325fdb991a0602a2f16a55fc1df2c303aded1 (patch)
tree6eba0129ce3cc84831b37e2ed64c473d053317ac /apps/codecs/libspeex/os_support.h
parent91f618f1ba1e507a9aa1cf7ee87eaf0370272b17 (diff)
downloadrockbox-85b325fdb991a0602a2f16a55fc1df2c303aded1.tar.gz
rockbox-85b325fdb991a0602a2f16a55fc1df2c303aded1.zip
Sync Speex to SVN. Disable stereo compatibility hack since we don't needed it and it produced warnings. Remove unneeded math.h
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15613 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/codecs/libspeex/os_support.h')
-rw-r--r--apps/codecs/libspeex/os_support.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/apps/codecs/libspeex/os_support.h b/apps/codecs/libspeex/os_support.h
index 92262f1942..7e4b25b3d9 100644
--- a/apps/codecs/libspeex/os_support.h
+++ b/apps/codecs/libspeex/os_support.h
@@ -41,10 +41,14 @@
41#include <stdio.h> 41#include <stdio.h>
42#include <stdlib.h> 42#include <stdlib.h>
43 43
44/** Speex wrapper for calloc. To do your own dynamic allocation, all you need to do is replace this function, speex_realloc and speex_free */ 44/** Speex wrapper for calloc. To do your own dynamic allocation, all you need to do is replace this function, speex_realloc and speex_free
45 NOTE: speex_alloc needs to CLEAR THE MEMORY */
45#ifndef OVERRIDE_SPEEX_ALLOC 46#ifndef OVERRIDE_SPEEX_ALLOC
46static inline void *speex_alloc (int size) 47static inline void *speex_alloc (int size)
47{ 48{
49 /* WARNING: this is not equivalent to malloc(). If you want to use malloc()
50 or your own allocator, YOU NEED TO CLEAR THE MEMORY ALLOCATED. Otherwise
51 you will experience strange bugs */
48 return calloc(size,1); 52 return calloc(size,1);
49} 53}
50#endif 54#endif
@@ -53,6 +57,7 @@ static inline void *speex_alloc (int size)
53#ifndef OVERRIDE_SPEEX_ALLOC_SCRATCH 57#ifndef OVERRIDE_SPEEX_ALLOC_SCRATCH
54static inline void *speex_alloc_scratch (int size) 58static inline void *speex_alloc_scratch (int size)
55{ 59{
60 /* Scratch space doesn't need to be cleared */
56 return calloc(size,1); 61 return calloc(size,1);
57} 62}
58#endif 63#endif