summaryrefslogtreecommitdiff
path: root/apps/playback.c
diff options
context:
space:
mode:
authorDave Chapman <dave@dchapman.com>2007-05-07 22:30:23 +0000
committerDave Chapman <dave@dchapman.com>2007-05-07 22:30:23 +0000
commitf4a9dab4d161a8f59800656417baf38e6f163f9d (patch)
treeab2b89c90480e1dbae5c83ece53a3ab7c116adf0 /apps/playback.c
parent173b611921db2d353d977dc617a8288345f5e6ed (diff)
Use a separate thread in test_codec, with the same (IRAM) stack as the main codec thread. Add a function to the plugin API to steal the codec thread, which test_codec copies and then restores. Now libmad can be benchmarked.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13347 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/playback.c')
-rw-r--r--apps/playback.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/apps/playback.c b/apps/playback.c
index 889cf9406e..33fbaf94a2 100644
--- a/apps/playback.c
+++ b/apps/playback.c
@@ -299,6 +299,13 @@ struct thread_entry *codec_thread_p; /* For modifying thread priority later. */
static volatile int current_codec IDATA_ATTR; /* Current codec (normal/voice) */
+/* test_codec steals the codec stack */
+void steal_codec_stack(unsigned char** stack, size_t* size)
+{
+ *stack = (unsigned char*)codec_stack;
+ *size = sizeof(codec_stack);
+}
+
/* Voice thread */
#ifdef PLAYBACK_VOICE