diff options
author | Linus Nielsen Feltzing <linus@haxx.se> | 2005-03-01 14:39:01 +0000 |
---|---|---|
committer | Linus Nielsen Feltzing <linus@haxx.se> | 2005-03-01 14:39:01 +0000 |
commit | 8fb87425f0137f6edb47f321087aa34f3c7af7aa (patch) | |
tree | 3e3df50c9d1687f10842f0a3f890f526fab03d94 | |
parent | 2d69f4c40246134f68fc218835cd90243a9e57c4 (diff) | |
download | rockbox-8fb87425f0137f6edb47f321087aa34f3c7af7aa.tar.gz rockbox-8fb87425f0137f6edb47f321087aa34f3c7af7aa.zip |
iRiver: Make better use of internal RAM, and larger buffers
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6096 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r-- | apps/plugins/mpa2wav.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/apps/plugins/mpa2wav.c b/apps/plugins/mpa2wav.c index a8d7cc01dc..2a87801999 100644 --- a/apps/plugins/mpa2wav.c +++ b/apps/plugins/mpa2wav.c | |||
@@ -121,8 +121,8 @@ signed int dither(mad_fixed_t sample, struct dither *dither) | |||
121 | 121 | ||
122 | #define SHRT_MAX 32767 | 122 | #define SHRT_MAX 32767 |
123 | 123 | ||
124 | #define INPUT_BUFFER_SIZE (5*8192) | 124 | #define INPUT_BUFFER_SIZE (10*8192) |
125 | #define OUTPUT_BUFFER_SIZE 8192 /* Must be an integer multiple of 4. */ | 125 | #define OUTPUT_BUFFER_SIZE 65536 /* Must be an integer multiple of 4. */ |
126 | 126 | ||
127 | unsigned char InputBuffer[INPUT_BUFFER_SIZE+MAD_BUFFER_GUARD]; | 127 | unsigned char InputBuffer[INPUT_BUFFER_SIZE+MAD_BUFFER_GUARD]; |
128 | unsigned char OutputBuffer[OUTPUT_BUFFER_SIZE]; | 128 | unsigned char OutputBuffer[OUTPUT_BUFFER_SIZE]; |
@@ -130,6 +130,12 @@ unsigned char *OutputPtr=OutputBuffer; | |||
130 | unsigned char *GuardPtr=NULL; | 130 | unsigned char *GuardPtr=NULL; |
131 | const unsigned char *OutputBufferEnd=OutputBuffer+OUTPUT_BUFFER_SIZE; | 131 | const unsigned char *OutputBufferEnd=OutputBuffer+OUTPUT_BUFFER_SIZE; |
132 | 132 | ||
133 | #ifndef SIMULATOR | ||
134 | extern char iramcopy[]; | ||
135 | extern char iramstart[]; | ||
136 | extern char iramend[]; | ||
137 | #endif | ||
138 | |||
133 | /* this is the plugin entry point */ | 139 | /* this is the plugin entry point */ |
134 | enum plugin_status plugin_start(struct plugin_api* api, void* file) | 140 | enum plugin_status plugin_start(struct plugin_api* api, void* file) |
135 | { | 141 | { |
@@ -145,6 +151,10 @@ enum plugin_status plugin_start(struct plugin_api* api, void* file) | |||
145 | TEST_PLUGIN_API(api); | 151 | TEST_PLUGIN_API(api); |
146 | rb = api; | 152 | rb = api; |
147 | 153 | ||
154 | #ifndef SIMULATOR | ||
155 | rb->memcpy(iramstart, iramcopy, iramend-iramstart); | ||
156 | #endif | ||
157 | |||
148 | /* This function sets up the buffers and reads the file into RAM */ | 158 | /* This function sets up the buffers and reads the file into RAM */ |
149 | 159 | ||
150 | if (local_init(file,"/libmadtest.wav",&file_info,api)) { | 160 | if (local_init(file,"/libmadtest.wav",&file_info,api)) { |