Sync Speex to SVN. Add new header file to adapt to Speex' new way of doing wrapper functions.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15209 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Thom Johansen 2007-10-19 21:10:25 +00:00
parent 6dc3a743ad
commit 56db559754
29 changed files with 639 additions and 673 deletions

View file

@ -19,8 +19,6 @@
#include "../codec.h"
#include "../lib/codeclib.h"
extern struct codec_api* ci;
#if defined(DEBUG) || defined(SIMULATOR)
#undef DEBUGF
#define DEBUGF ci->debugf
@ -35,62 +33,7 @@ extern struct codec_api* ci;
#define LOGF(...)
#endif
void *speex_alloc (int size)
{
return codec_calloc(size, 1);
}
void *speex_alloc_scratch (int size)
{
return codec_calloc(size,1);
}
void *speex_realloc (void *ptr, int size)
{
return codec_realloc(ptr, size);
}
void speex_free (void *ptr)
{
codec_free(ptr);
}
void speex_free_scratch (void *ptr)
{
codec_free(ptr);
}
void *speex_move (void *dest, void *src, int n)
{
return memmove(dest,src,n);
}
void speex_error(const char *str)
{
DEBUGF("Fatal error: %s\n", str);
//exit(1);
}
void speex_warning(const char *str)
{
DEBUGF("warning: %s\n", str);
}
void speex_warning_int(const char *str, int val)
{
DEBUGF("warning: %s %d\n", str, val);
}
void speex_notify(const char *str)
{
DEBUGF("notice: %s\n", str);
}
void _speex_putc(int ch, void *file)
{
//FILE *f = (FILE *)file;
//printf("%c", ch);
}
extern struct codec_api* ci;
float floor(float x) {
return ((float)(((int)x)));