From 8fb87425f0137f6edb47f321087aa34f3c7af7aa Mon Sep 17 00:00:00 2001 From: Linus Nielsen Feltzing Date: Tue, 1 Mar 2005 14:39:01 +0000 Subject: 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 --- apps/plugins/mpa2wav.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'apps/plugins') 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) #define SHRT_MAX 32767 -#define INPUT_BUFFER_SIZE (5*8192) -#define OUTPUT_BUFFER_SIZE 8192 /* Must be an integer multiple of 4. */ +#define INPUT_BUFFER_SIZE (10*8192) +#define OUTPUT_BUFFER_SIZE 65536 /* Must be an integer multiple of 4. */ unsigned char InputBuffer[INPUT_BUFFER_SIZE+MAD_BUFFER_GUARD]; unsigned char OutputBuffer[OUTPUT_BUFFER_SIZE]; @@ -130,6 +130,12 @@ unsigned char *OutputPtr=OutputBuffer; unsigned char *GuardPtr=NULL; const unsigned char *OutputBufferEnd=OutputBuffer+OUTPUT_BUFFER_SIZE; +#ifndef SIMULATOR +extern char iramcopy[]; +extern char iramstart[]; +extern char iramend[]; +#endif + /* this is the plugin entry point */ enum plugin_status plugin_start(struct plugin_api* api, void* file) { @@ -145,6 +151,10 @@ enum plugin_status plugin_start(struct plugin_api* api, void* file) TEST_PLUGIN_API(api); rb = api; +#ifndef SIMULATOR + rb->memcpy(iramstart, iramcopy, iramend-iramstart); +#endif + /* This function sets up the buffers and reads the file into RAM */ if (local_init(file,"/libmadtest.wav",&file_info,api)) { -- cgit v1.2.3