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/zxbox | |
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/zxbox')
-rw-r--r-- | apps/plugins/zxbox/zxbox.c | 17 |
1 files changed, 2 insertions, 15 deletions
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 @@ | |||
20 | #include "zxconfig.h" | 20 | #include "zxconfig.h" |
21 | 21 | ||
22 | PLUGIN_HEADER | 22 | PLUGIN_HEADER |
23 | PLUGIN_IRAM_DECLARE | ||
23 | 24 | ||
24 | struct plugin_api* rb; | 25 | struct plugin_api* rb; |
25 | 26 | ||
@@ -37,14 +38,6 @@ int use_shm = 0; | |||
37 | int small_screen,pause_on_iconify; | 38 | int small_screen,pause_on_iconify; |
38 | int vga_pause_bg; | 39 | int vga_pause_bg; |
39 | 40 | ||
40 | #ifdef USE_IRAM | ||
41 | extern char iramcopy[]; | ||
42 | extern char iramstart[]; | ||
43 | extern char iramend[]; | ||
44 | extern char iedata[]; | ||
45 | extern char iend[]; | ||
46 | #endif | ||
47 | |||
48 | #include "keymaps.h" | 41 | #include "keymaps.h" |
49 | #include "zxvid_com.h" | 42 | #include "zxvid_com.h" |
50 | #include "spmain.h" | 43 | #include "spmain.h" |
@@ -75,13 +68,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) | |||
75 | rb->lcd_set_backdrop(NULL); | 68 | rb->lcd_set_backdrop(NULL); |
76 | rb->splash(HZ, true, "Welcome to ZXBox"); | 69 | rb->splash(HZ, true, "Welcome to ZXBox"); |
77 | 70 | ||
78 | #ifdef USE_IRAM | 71 | PLUGIN_IRAM_INIT(rb) |
79 | /* We need to stop audio playback in order to use IRAM */ | ||
80 | rb->audio_stop(); | ||
81 | |||
82 | rb->memcpy(iramstart, iramcopy, iramend-iramstart); | ||
83 | rb->memset(iedata, 0, iend - iedata); | ||
84 | #endif | ||
85 | 72 | ||
86 | sp_init(); | 73 | sp_init(); |
87 | 74 | ||