mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-11-13 15:12:30 -05:00
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
This commit is contained in:
parent
2d69f4c402
commit
8fb87425f0
1 changed files with 12 additions and 2 deletions
|
|
@ -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)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue