New makefile solution: A single invocation of 'make' to build the entire tree. Fully...
[kugel-rb.git] / apps / codecs / libspeex / rockbox.h
blob459c8b532f0fa2d75ff86a9cca4877da2edf9c2f
1 /**************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
9 * Copyright (C) 2007 Dan Everton
11 * This program is free software; you can redistribute it and/or
12 * modify it under the terms of the GNU General Public License
13 * as published by the Free Software Foundation; either version 2
14 * of the License, or (at your option) any later version.
16 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
17 * KIND, either express or implied.
19 ***************************************************************************/
21 #ifndef SPEEX_ROCKBOX_H
22 #define SPEEX_ROCKBOX_H
24 /* We don't want all this stuff if we're building encoder */
25 #ifndef ROCKBOX_VOICE_ENCODER
27 #include "codeclib.h"
28 #include "debug.h"
30 #if !defined(ROCKBOX_VOICE_CODEC)
32 #if defined(DEBUG) || defined(SIMULATOR)
33 #undef DEBUGF
34 #define DEBUGF ci->debugf
35 #endif
38 #ifdef ROCKBOX_HAS_LOGF
39 #undef LOGF
40 #define LOGF ci->logf
41 #endif
43 #endif /* ROCKBOX_VOICE_CODEC */
45 #define OVERRIDE_SPEEX_ALLOC 1
46 static inline void *speex_alloc (int size)
48 return codec_calloc(size, 1);
51 #define OVERRIDE_SPEEX_ALLOC_SCRATCH 1
52 static inline void *speex_alloc_scratch (int size)
54 return codec_calloc(size,1);
57 #define OVERRIDE_SPEEX_REALLOC 1
58 static inline void *speex_realloc (void *ptr, int size)
60 return codec_realloc(ptr, size);
63 #define OVERRIDE_SPEEX_FREE 1
64 static inline void speex_free (void *ptr)
66 codec_free(ptr);
69 #define OVERRIDE_SPEEX_FREE_SCRATCH 1
70 static inline void speex_free_scratch (void *ptr)
72 codec_free(ptr);
75 #define OVERRIDE_SPEEX_FATAL 1
76 static inline void _speex_fatal(const char *str, const char *file, int line)
78 (void)str;
79 (void)file;
80 (void)line;
81 DEBUGF("Fatal error: %s\n", str);
82 //exit(1);
85 #define OVERRIDE_SPEEX_WARNING 1
86 static inline void speex_warning(const char *str)
88 (void)str;
89 DEBUGF("warning: %s\n", str);
92 #define OVERRIDE_SPEEX_WARNING_INT 1
93 static inline void speex_warning_int(const char *str, int val)
95 (void)str;
96 (void)val;
97 DEBUGF("warning: %s %d\n", str, val);
100 #define OVERRIDE_SPEEX_NOTIFY 1
101 static inline void speex_notify(const char *str)
103 (void)str;
104 DEBUGF("notice: %s\n", str);
107 #define OVERRIDE_SPEEX_PUTC 1
108 static inline void _speex_putc(int ch, void *file)
110 (void)ch;
111 (void)file;
112 //FILE *f = (FILE *)file;
113 //printf("%c", ch);
116 #endif /* ROCKBOX_VOICE_ENCODER */
118 #endif