summaryrefslogtreecommitdiff
path: root/apps/plugins/rockboy
diff options
context:
space:
mode:
authorMichael Sevakis <jethead71@rockbox.org>2006-11-18 02:18:29 +0000
committerMichael Sevakis <jethead71@rockbox.org>2006-11-18 02:18:29 +0000
commitacc29d95be85c9cfd0d8f74dda813d7d1082e2ec (patch)
tree81fdd154d122b393d6254968cba5bc90b63e4741 /apps/plugins/rockboy
parente2a262ee258769136eadc58c2bc8e3aa53db1a71 (diff)
downloadrockbox-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.c16
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
23PLUGIN_HEADER 23PLUGIN_HEADER
24 24PLUGIN_IRAM_DECLARE
25#ifdef USE_IRAM
26extern char iramcopy[];
27extern char iramstart[];
28extern char iramend[];
29extern char iedata[];
30extern 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