Remove the mad_frame_overlap[] buffer from the main (IRAM) stack in order to prevent the reported stack overflows. On Coldfire, there is enough room to keep it in IRAM, but not on PortalPlayer. However, this should not cause problems as the audio thread has an entire core to itself (except for buffering) and IRAM doesn't make much difference on PP502x.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13968 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
34a6c4748c
commit
b97c00dc8e
1 changed files with 9 additions and 3 deletions
|
@ -383,6 +383,15 @@ struct mad_synth synth IBSS_ATTR;
|
|||
|
||||
unsigned char mad_main_data[MAD_BUFFER_MDLEN]; /* 2567 bytes */
|
||||
|
||||
/* There isn't enough room for this in IRAM on PortalPlayer, but there
|
||||
is for Coldfire. */
|
||||
|
||||
#ifdef CPU_COLDFIRE
|
||||
static mad_fixed_t mad_frame_overlap[2][32][18] IBSS_ATTR; /* 4608 bytes */
|
||||
#else
|
||||
static mad_fixed_t mad_frame_overlap[2][32][18]; /* 4608 bytes */
|
||||
#endif
|
||||
|
||||
static void init_mad(void* mad_frame_overlap)
|
||||
{
|
||||
rb->memset(&stream, 0, sizeof(struct mad_stream));
|
||||
|
@ -1775,9 +1784,6 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
|
|||
int grayscales;
|
||||
#endif
|
||||
|
||||
/* We define this here so it is on the main stack (in IRAM) */
|
||||
mad_fixed_t mad_frame_overlap[2][32][18]; /* 4608 bytes */
|
||||
|
||||
if (parameter == NULL)
|
||||
{
|
||||
api->splash(HZ*2, "No File");
|
||||
|
|
Loading…
Reference in a new issue