diff options
author | Nils Wallménius <nils@rockbox.org> | 2008-10-19 12:35:53 +0000 |
---|---|---|
committer | Nils Wallménius <nils@rockbox.org> | 2008-10-19 12:35:53 +0000 |
commit | 2f50cd58b9fb7cd75448622b5ac222cdcad6bc6f (patch) | |
tree | 880a25472bfa6ce2fcda13a334c17607aa1ad419 /apps/codecs.h | |
parent | 01177055425776fadbdd6cf167111105b118754a (diff) | |
download | rockbox-2f50cd58b9fb7cd75448622b5ac222cdcad6bc6f.tar.gz rockbox-2f50cd58b9fb7cd75448622b5ac222cdcad6bc6f.zip |
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
Diffstat (limited to 'apps/codecs.h')
-rw-r--r-- | apps/codecs.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/apps/codecs.h b/apps/codecs.h index becb73c8b7..6d8c1016a8 100644 --- a/apps/codecs.h +++ b/apps/codecs.h | |||
@@ -82,12 +82,12 @@ | |||
82 | #define CODEC_ENC_MAGIC 0x52454E43 /* RENC */ | 82 | #define CODEC_ENC_MAGIC 0x52454E43 /* RENC */ |
83 | 83 | ||
84 | /* increase this every time the api struct changes */ | 84 | /* increase this every time the api struct changes */ |
85 | #define CODEC_API_VERSION 25 | 85 | #define CODEC_API_VERSION 26 |
86 | 86 | ||
87 | /* update this to latest version if a change to the api struct breaks | 87 | /* update this to latest version if a change to the api struct breaks |
88 | backwards compatibility (and please take the opportunity to sort in any | 88 | backwards compatibility (and please take the opportunity to sort in any |
89 | new function which are "waiting" at the end of the function table) */ | 89 | new function which are "waiting" at the end of the function table) */ |
90 | #define CODEC_MIN_API_VERSION 25 | 90 | #define CODEC_MIN_API_VERSION 26 |
91 | 91 | ||
92 | /* codec return codes */ | 92 | /* codec return codes */ |
93 | enum codec_status { | 93 | enum codec_status { |
@@ -125,7 +125,7 @@ struct codec_api { | |||
125 | struct dsp_config *dsp; | 125 | struct dsp_config *dsp; |
126 | 126 | ||
127 | /* Returns buffer to malloc array. Only codeclib should need this. */ | 127 | /* Returns buffer to malloc array. Only codeclib should need this. */ |
128 | void* (*get_codec_memory)(size_t *size); | 128 | void* (*codec_get_buffer)(size_t *size); |
129 | /* Insert PCM data into audio buffer for playback. Playback will start | 129 | /* Insert PCM data into audio buffer for playback. Playback will start |
130 | automatically. */ | 130 | automatically. */ |
131 | bool (*pcmbuf_insert)(const void *ch1, const void *ch2, int count); | 131 | bool (*pcmbuf_insert)(const void *ch1, const void *ch2, int count); |
@@ -256,6 +256,9 @@ struct codec_header { | |||
256 | enum codec_status(*entry_point)(struct codec_api*); | 256 | enum codec_status(*entry_point)(struct codec_api*); |
257 | }; | 257 | }; |
258 | 258 | ||
259 | extern unsigned char codecbuf[]; | ||
260 | extern size_t codec_size; | ||
261 | |||
259 | #ifdef CODEC | 262 | #ifdef CODEC |
260 | #ifndef SIMULATOR | 263 | #ifndef SIMULATOR |
261 | /* plugin_* is correct, codecs use the plugin linker script */ | 264 | /* plugin_* is correct, codecs use the plugin linker script */ |