diff options
author | Michael Sevakis <jethead71@rockbox.org> | 2006-11-18 02:18:29 +0000 |
---|---|---|
committer | Michael Sevakis <jethead71@rockbox.org> | 2006-11-18 02:18:29 +0000 |
commit | acc29d95be85c9cfd0d8f74dda813d7d1082e2ec (patch) | |
tree | 81fdd154d122b393d6254968cba5bc90b63e4741 /apps/plugins/rockboy | |
parent | e2a262ee258769136eadc58c2bc8e3aa53db1a71 (diff) | |
download | rockbox-acc29d95be85c9cfd0d8f74dda813d7d1082e2ec.tar.gz rockbox-acc29d95be85c9cfd0d8f74dda813d7d1082e2ec.zip |
SWCODEC/IRAM: Save voice IRAM when a plugin initializes its IRAM. Defines two macros for declaring and initializing IRAM. Plugins should use these instead. See mp3_encoder, doom, etc. for details. Further tweaks in buffer restoration after other use. Hiding of some interfaces that should only be used by buffer management.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11544 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/rockboy')
-rw-r--r-- | apps/plugins/rockboy/rockboy.c | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/apps/plugins/rockboy/rockboy.c b/apps/plugins/rockboy/rockboy.c index f82b0c283a..6a72856bbb 100644 --- a/apps/plugins/rockboy/rockboy.c +++ b/apps/plugins/rockboy/rockboy.c | |||
@@ -21,14 +21,7 @@ | |||
21 | #include "rockmacros.h" | 21 | #include "rockmacros.h" |
22 | 22 | ||
23 | PLUGIN_HEADER | 23 | PLUGIN_HEADER |
24 | 24 | PLUGIN_IRAM_DECLARE | |
25 | #ifdef USE_IRAM | ||
26 | extern char iramcopy[]; | ||
27 | extern char iramstart[]; | ||
28 | extern char iramend[]; | ||
29 | extern char iedata[]; | ||
30 | extern char iend[]; | ||
31 | #endif | ||
32 | 25 | ||
33 | /* here is a global api struct pointer. while not strictly necessary, | 26 | /* here is a global api struct pointer. while not strictly necessary, |
34 | it's nice not to have to pass the api pointer in all function calls | 27 | it's nice not to have to pass the api pointer in all function calls |
@@ -187,10 +180,9 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) | |||
187 | audio_buffer_free = plugin_start_addr - (unsigned char *)audio_bufferbase; | 180 | audio_buffer_free = plugin_start_addr - (unsigned char *)audio_bufferbase; |
188 | #endif | 181 | #endif |
189 | setoptions(); | 182 | setoptions(); |
190 | #ifdef USE_IRAM | 183 | |
191 | memcpy(iramstart, iramcopy, iramend-iramstart); | 184 | PLUGIN_IRAM_INIT(rb) |
192 | memset(iedata, 0, iend - iedata); | 185 | |
193 | #endif | ||
194 | shut=0; | 186 | shut=0; |
195 | cleanshut=0; | 187 | cleanshut=0; |
196 | 188 | ||