summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Chapman <dave@dchapman.com>2006-03-11 17:56:10 +0000
committerDave Chapman <dave@dchapman.com>2006-03-11 17:56:10 +0000
commit07476d52de96eb25cceb1a318b100d8c8cb79576 (patch)
treec66e3f48d631417b0e3d9adfc544a347112ff64b
parentaa715141cf11bfcb49230a6d1ba25b1b79f84334 (diff)
downloadrockbox-07476d52de96eb25cceb1a318b100d8c8cb79576.tar.gz
rockbox-07476d52de96eb25cceb1a318b100d8c8cb79576.zip
Stop audio playback before using IRAM
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9005 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/plugins/pacbox/pacbox.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/apps/plugins/pacbox/pacbox.c b/apps/plugins/pacbox/pacbox.c
index b8625eead6..7177245d9f 100644
--- a/apps/plugins/pacbox/pacbox.c
+++ b/apps/plugins/pacbox/pacbox.c
@@ -489,10 +489,18 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
{
(void)parameter;
int status;
+#ifdef USE_IRAM
+ void* audiobuf;
+ int audiosize;
+#endif
rb = api;
#ifdef USE_IRAM
+ /* We need to stop audio playback in order to use IRAM, so we grab
+ the audio buffer - but we don't use it. */
+ audiobuf = rb->plugin_get_audio_buffer(&audiosize);
+
rb->memcpy(iramstart, iramcopy, iramend-iramstart);
rb->memset(iedata, 0, iend - iedata);
#endif