1
0
Fork 0
forked from len0rd/rockbox

Revert the addition of the steal_codec_stack function. Replace by accessing the threads structure to grab the codec stack. Maybe a better solution exists.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13349 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Dave Chapman 2007-05-07 23:54:10 +00:00
parent 3d53e10341
commit 4ae85e6886
5 changed files with 22 additions and 11 deletions

View file

@ -243,6 +243,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
{
size_t n;
int fd;
int i;
unsigned long starttick;
unsigned long ticks;
unsigned long speed;
@ -260,7 +261,23 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
return PLUGIN_ERROR;
}
rb->steal_codec_stack(&codec_stack,&codec_stack_size);
/* Borrow the codec thread's stack (in IRAM on most targets) */
codec_stack = NULL;
for (i = 0; i < MAXTHREADS; i++)
{
if (rb->strcmp(rb->threads[i].name,"codec")==0)
{
codec_stack = rb->threads[i].stack;
codec_stack_size = rb->threads[i].stack_size;
break;
}
}
if (codec_stack == NULL)
{
rb->splash(HZ*2, "No codec thread!");
return PLUGIN_ERROR;
}
codec_mallocbuf = rb->plugin_get_audio_buffer(&audiosize);
codec_stack_copy = codec_mallocbuf + 512*1024;