rockbox/apps/codecs/libspeex/rockbox.h
Daniel Stenberg 2acc0ac542 Updated our source code header to explicitly mention that we are GPL v2 or
later. We still need to hunt down snippets used that are not. 1324 modified
files...
http://www.rockbox.org/mail/archive/rockbox-dev-archive-2008-06/0060.shtml


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17847 a1c6a512-1295-4272-9138-f99709370657
2008-06-28 18:10:04 +00:00

110 lines
2.6 KiB
C

/**************************************************************************
* __________ __ ___.
* Open \______ \ ____ ____ | | _\_ |__ _______ ___
* Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
* \/ \/ \/ \/ \/
*
* Copyright (C) 2007 Dan Everton
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
* KIND, either express or implied.
*
***************************************************************************/
#ifndef SPEEX_ROCKBOX_H
#define SPEEX_ROCKBOX_H
/* We don't want all this stuff if we're building encoder */
#ifndef ROCKBOX_VOICE_ENCODER
#include "../codec.h"
#include "../lib/codeclib.h"
#include "debug.h"
#if !defined(ROCKBOX_VOICE_CODEC)
#if defined(DEBUG) || defined(SIMULATOR)
#undef DEBUGF
#define DEBUGF ci->debugf
#endif
#ifdef ROCKBOX_HAS_LOGF
#undef LOGF
#define LOGF ci->logf
#endif
#endif /* ROCKBOX_VOICE_CODEC */
#define OVERRIDE_SPEEX_ALLOC 1
static inline void *speex_alloc (int size)
{
return codec_calloc(size, 1);
}
#define OVERRIDE_SPEEX_ALLOC_SCRATCH 1
static inline void *speex_alloc_scratch (int size)
{
return codec_calloc(size,1);
}
#define OVERRIDE_SPEEX_REALLOC 1
static inline void *speex_realloc (void *ptr, int size)
{
return codec_realloc(ptr, size);
}
#define OVERRIDE_SPEEX_FREE 1
static inline void speex_free (void *ptr)
{
codec_free(ptr);
}
#define OVERRIDE_SPEEX_FREE_SCRATCH 1
static inline void speex_free_scratch (void *ptr)
{
codec_free(ptr);
}
#define OVERRIDE_SPEEX_FATAL 1
static inline void _speex_fatal(const char *str, const char *file, int line)
{
DEBUGF("Fatal error: %s\n", str);
//exit(1);
}
#define OVERRIDE_SPEEX_WARNING 1
static inline void speex_warning(const char *str)
{
DEBUGF("warning: %s\n", str);
}
#define OVERRIDE_SPEEX_WARNING_INT 1
static inline void speex_warning_int(const char *str, int val)
{
DEBUGF("warning: %s %d\n", str, val);
}
#define OVERRIDE_SPEEX_NOTIFY 1
static inline void speex_notify(const char *str)
{
DEBUGF("notice: %s\n", str);
}
#define OVERRIDE_SPEEX_PUTC 1
static inline void _speex_putc(int ch, void *file)
{
//FILE *f = (FILE *)file;
//printf("%c", ch);
}
#endif /* ROCKBOX_VOICE_ENCODER */
#endif