forked from len0rd/rockbox
Add rbcodecplatform.h and rbcodecconfig.h.
librbcodec users must provide these two files when the library is built. rbcodecconfig.h provides configuration #defines and basic types, and will be included by public librbcodec headers, so it must not conflict with the user's code. rbcodecplatform.h provides various OS functions, and will only be included by source files and private headers. This system is intended to provide maximum flexibility for use on embedded systems, where no operating system headers are included. Unix systems can just copy rbcodecconfig-example.h and rbcodecplatform-unix.h with minimal changes. Change-Id: I350a2274d173da391fd1ca00c4202e9760d91def Reviewed-on: http://gerrit.rockbox.org/143 Reviewed-by: Nils Wallménius <nils@rockbox.org> Tested-by: Nils Wallménius <nils@rockbox.org>
This commit is contained in:
parent
5f0cb71361
commit
cadb3627fc
70 changed files with 430 additions and 81 deletions
|
@ -34,12 +34,13 @@
|
|||
#include "buffering.h" /* TYPE_PACKET_AUDIO */
|
||||
#include "codecs.h"
|
||||
#include "core_alloc.h" /* core_allocator_init */
|
||||
#include "debug.h"
|
||||
#include "dsp_core.h"
|
||||
#include "metadata.h"
|
||||
#include "settings.h"
|
||||
#include "sound.h"
|
||||
#include "tdspeed.h"
|
||||
#include "kernel.h"
|
||||
#include "platform.h"
|
||||
|
||||
/***************** EXPORTED *****************/
|
||||
|
||||
|
@ -581,6 +582,29 @@ static unsigned ci_sleep(unsigned ticks)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static void ci_debugf(const char *fmt, ...)
|
||||
{
|
||||
va_list ap;
|
||||
va_start(ap, fmt);
|
||||
vfprintf(stderr, fmt, ap);
|
||||
va_end(ap);
|
||||
}
|
||||
|
||||
#ifdef ROCKBOX_HAS_LOGF
|
||||
static void ci_logf(const char *fmt, ...)
|
||||
{
|
||||
va_list ap;
|
||||
va_start(ap, fmt);
|
||||
vfprintf(stderr, fmt, ap);
|
||||
putc('\n', stderr);
|
||||
va_end(ap);
|
||||
}
|
||||
#endif
|
||||
|
||||
static void commit_dcache(void) {}
|
||||
static void commit_discard_dcache(void) {}
|
||||
static void commit_discard_idcache(void) {}
|
||||
|
||||
static struct codec_api ci = {
|
||||
|
||||
0, /* filesize */
|
||||
|
@ -628,10 +652,10 @@ static struct codec_api ci = {
|
|||
memcmp,
|
||||
memchr,
|
||||
#if defined(DEBUG) || defined(SIMULATOR)
|
||||
debugf,
|
||||
ci_debugf,
|
||||
#endif
|
||||
#ifdef ROCKBOX_HAS_LOGF
|
||||
debugf, /* logf */
|
||||
ci_logf,
|
||||
#endif
|
||||
|
||||
qsort,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue