summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorThom Johansen <thomj@rockbox.org>2006-01-17 21:38:16 +0000
committerThom Johansen <thomj@rockbox.org>2006-01-17 21:38:16 +0000
commit507ff53c9c429de6c3bf5bfd6eb1a129cfc12cad (patch)
tree5394ddf6658b1409a6ae245e33bc3ff59a127902 /apps
parenta40d355ee7c57b96dc3e5320f16ea6cc808483f3 (diff)
Remove use of stdio.h. Proper handling of IRAM.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8361 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r--apps/plugins/mp3_encoder.c18
1 files changed, 13 insertions, 5 deletions
diff --git a/apps/plugins/mp3_encoder.c b/apps/plugins/mp3_encoder.c
index 1437ca2090..2fce02c705 100644
--- a/apps/plugins/mp3_encoder.c
+++ b/apps/plugins/mp3_encoder.c
@@ -11,8 +11,6 @@
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Library General Public License for more details.
-#include <stdio.h>
-
#define samp_per_frame 1152
#define samp_per_frame2 576
#define HAN_SIZE 512
@@ -41,9 +39,14 @@ enum e_byte_order { order_unknown, order_bigEndian, order_littleEndian };
PLUGIN_HEADER
static struct plugin_api* rb;
-extern char iramcopy[];
-extern char iramstart[];
-extern char iramend[];
+
+#ifdef USE_IRAM
+extern char iramcopy[];
+extern char iramstart[];
+extern char iramend[];
+extern char iedata[];
+extern char iend[];
+#endif
typedef struct {
PFILE file;
@@ -1897,6 +1900,11 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
(void)parameter;
rb = api;
+#ifdef USE_IRAM
+ memcpy(iramstart, iramcopy, iramend - iramstart);
+ memset(iedata, 0, iend - iedata);
+#endif
+
rb->lcd_setfont(FONT_SYSFIXED);
#ifdef HAVE_ADJUSTABLE_CPU_FREQ