From 85b325fdb991a0602a2f16a55fc1df2c303aded1 Mon Sep 17 00:00:00 2001 From: Thom Johansen Date: Wed, 14 Nov 2007 02:15:56 +0000 Subject: 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 --- apps/codecs/libspeex/os_support.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'apps/codecs/libspeex/os_support.h') 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 @@ #include #include -/** Speex wrapper for calloc. To do your own dynamic allocation, all you need to do is replace this function, speex_realloc and speex_free */ +/** Speex wrapper for calloc. To do your own dynamic allocation, all you need to do is replace this function, speex_realloc and speex_free + NOTE: speex_alloc needs to CLEAR THE MEMORY */ #ifndef OVERRIDE_SPEEX_ALLOC static inline void *speex_alloc (int size) { + /* WARNING: this is not equivalent to malloc(). If you want to use malloc() + or your own allocator, YOU NEED TO CLEAR THE MEMORY ALLOCATED. Otherwise + you will experience strange bugs */ return calloc(size,1); } #endif @@ -53,6 +57,7 @@ static inline void *speex_alloc (int size) #ifndef OVERRIDE_SPEEX_ALLOC_SCRATCH static inline void *speex_alloc_scratch (int size) { + /* Scratch space doesn't need to be cleared */ return calloc(size,1); } #endif -- cgit v1.2.3