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/zxbox/zxbox.c | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) (limited to 'apps/plugins/zxbox/zxbox.c') diff --git a/apps/plugins/zxbox/zxbox.c b/apps/plugins/zxbox/zxbox.c index 54a11d010e..753fb1ff5b 100644 --- a/apps/plugins/zxbox/zxbox.c +++ b/apps/plugins/zxbox/zxbox.c @@ -20,6 +20,7 @@ #include "zxconfig.h" PLUGIN_HEADER +PLUGIN_IRAM_DECLARE struct plugin_api* rb; @@ -37,14 +38,6 @@ int use_shm = 0; int small_screen,pause_on_iconify; int vga_pause_bg; -#ifdef USE_IRAM -extern char iramcopy[]; -extern char iramstart[]; -extern char iramend[]; -extern char iedata[]; -extern char iend[]; -#endif - #include "keymaps.h" #include "zxvid_com.h" #include "spmain.h" @@ -75,13 +68,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) rb->lcd_set_backdrop(NULL); rb->splash(HZ, true, "Welcome to ZXBox"); -#ifdef USE_IRAM - /* We need to stop audio playback in order to use IRAM */ - rb->audio_stop(); - - rb->memcpy(iramstart, iramcopy, iramend-iramstart); - rb->memset(iedata, 0, iend - iedata); -#endif + PLUGIN_IRAM_INIT(rb) sp_init(); -- cgit v1.2.3