diff options
Diffstat (limited to 'tests/m4a/shim')
| -rw-r--r-- | tests/m4a/shim/codeclib.h | 3 | ||||
| -rw-r--r-- | tests/m4a/shim/codecs.h | 24 |
2 files changed, 27 insertions, 0 deletions
diff --git a/tests/m4a/shim/codeclib.h b/tests/m4a/shim/codeclib.h new file mode 100644 index 0000000..1c46fd0 --- /dev/null +++ b/tests/m4a/shim/codeclib.h @@ -0,0 +1,3 @@ +#include "codecs.h" +void *codec_malloc(size_t size); +#define malloc(x) codec_malloc(x) diff --git a/tests/m4a/shim/codecs.h b/tests/m4a/shim/codecs.h new file mode 100644 index 0000000..e2215ce --- /dev/null +++ b/tests/m4a/shim/codecs.h @@ -0,0 +1,24 @@ +/* Host stand-in for the parts of codecs.h that libm4a/demux.c uses */ +#ifndef CODECS_H +#define CODECS_H +#include <stddef.h> +#include <stdint.h> +#include <stdbool.h> +#include <sys/types.h> +enum { AFMT_MP4_AAC = 1, AFMT_MP4_AAC_HE, AFMT_MP4_ALAC }; +struct mp3entry { unsigned long length; int codectype; }; +#define CODEC_SIZE (128 * 1024) /* yp3.h, near enough */ +struct codec_api { + size_t filesize, curpos; + struct mp3entry *id3; + size_t (*read_filebuf)(void *ptr, size_t size); + void (*advance_buffer)(size_t amount); + bool (*seek_buffer)(size_t newpos); + void (*yield)(void); + void (*debugf)(const char *fmt, ...); + bool (*load_progress)(int percent); +}; +extern struct codec_api *ci; +#define ROCKBOX_LITTLE_ENDIAN 1 +#define MIN(a, b) ((a) < (b) ? (a) : (b)) +#endif |
