From acc29d95be85c9cfd0d8f74dda813d7d1082e2ec Mon Sep 17 00:00:00 2001 From: Michael Sevakis Date: Sat, 18 Nov 2006 02:18:29 +0000 Subject: 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 --- apps/plugins/rockboy/rockboy.c | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) (limited to 'apps/plugins/rockboy') 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 @@ #include "rockmacros.h" PLUGIN_HEADER - -#ifdef USE_IRAM -extern char iramcopy[]; -extern char iramstart[]; -extern char iramend[]; -extern char iedata[]; -extern char iend[]; -#endif +PLUGIN_IRAM_DECLARE /* here is a global api struct pointer. while not strictly necessary, 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) audio_buffer_free = plugin_start_addr - (unsigned char *)audio_bufferbase; #endif setoptions(); -#ifdef USE_IRAM - memcpy(iramstart, iramcopy, iramend-iramstart); - memset(iedata, 0, iend - iedata); -#endif + + PLUGIN_IRAM_INIT(rb) + shut=0; cleanshut=0; -- cgit v1.2.3