forked from len0rd/rockbox
Codec memory reorganization
Based on a patch by Tomasz Malesinski * Merge Codec buffer and Malloc buffer into one large buffer. * The new merged buffer is now 1MB on targets with lots of memory. * Renamed codec_get_memory to codec_get_buffer and made it behave more. like plugin_get_buffer. * Bumped Codec api and min api versions. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18834 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
0117705542
commit
2f50cd58b9
45 changed files with 66 additions and 57 deletions
|
@ -82,12 +82,12 @@
|
|||
#define CODEC_ENC_MAGIC 0x52454E43 /* RENC */
|
||||
|
||||
/* increase this every time the api struct changes */
|
||||
#define CODEC_API_VERSION 25
|
||||
#define CODEC_API_VERSION 26
|
||||
|
||||
/* update this to latest version if a change to the api struct breaks
|
||||
backwards compatibility (and please take the opportunity to sort in any
|
||||
new function which are "waiting" at the end of the function table) */
|
||||
#define CODEC_MIN_API_VERSION 25
|
||||
#define CODEC_MIN_API_VERSION 26
|
||||
|
||||
/* codec return codes */
|
||||
enum codec_status {
|
||||
|
@ -125,7 +125,7 @@ struct codec_api {
|
|||
struct dsp_config *dsp;
|
||||
|
||||
/* Returns buffer to malloc array. Only codeclib should need this. */
|
||||
void* (*get_codec_memory)(size_t *size);
|
||||
void* (*codec_get_buffer)(size_t *size);
|
||||
/* Insert PCM data into audio buffer for playback. Playback will start
|
||||
automatically. */
|
||||
bool (*pcmbuf_insert)(const void *ch1, const void *ch2, int count);
|
||||
|
@ -256,6 +256,9 @@ struct codec_header {
|
|||
enum codec_status(*entry_point)(struct codec_api*);
|
||||
};
|
||||
|
||||
extern unsigned char codecbuf[];
|
||||
extern size_t codec_size;
|
||||
|
||||
#ifdef CODEC
|
||||
#ifndef SIMULATOR
|
||||
/* plugin_* is correct, codecs use the plugin linker script */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue