diff options
author | Thom Johansen <thomj@rockbox.org> | 2007-11-14 02:15:56 +0000 |
---|---|---|
committer | Thom Johansen <thomj@rockbox.org> | 2007-11-14 02:15:56 +0000 |
commit | 85b325fdb991a0602a2f16a55fc1df2c303aded1 (patch) | |
tree | 6eba0129ce3cc84831b37e2ed64c473d053317ac /apps/codecs/libspeex/os_support.h | |
parent | 91f618f1ba1e507a9aa1cf7ee87eaf0370272b17 (diff) | |
download | rockbox-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.h | 7 |
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 |
46 | static inline void *speex_alloc (int size) | 47 | static 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 |
54 | static inline void *speex_alloc_scratch (int size) | 58 | static 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 |