1
0
Fork 0
forked from len0rd/rockbox

Added mpeg_is_playing support for simulators

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@1620 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Björn Stenberg 2002-08-08 16:44:20 +00:00
parent 03894b810e
commit 66b7ade58d

View file

@ -226,7 +226,10 @@ static void remove_all_tags(void)
} }
#endif #endif
#ifndef SIMULATOR #ifdef SIMULATOR
static bool playing = false;
static bool play_pending = false;
#else
static int last_dma_tick = 0; static int last_dma_tick = 0;
static int pause_tick = 0; static int pause_tick = 0;
@ -1050,6 +1053,7 @@ void mpeg_play(char* trackname)
{ {
#ifdef SIMULATOR #ifdef SIMULATOR
mp3info(&taginfo, trackname); mp3info(&taginfo, trackname);
playing = true;
#else #else
queue_post(&mpeg_queue, MPEG_PLAY, trackname); queue_post(&mpeg_queue, MPEG_PLAY, trackname);
#endif #endif
@ -1059,6 +1063,8 @@ void mpeg_stop(void)
{ {
#ifndef SIMULATOR #ifndef SIMULATOR
queue_post(&mpeg_queue, MPEG_STOP, NULL); queue_post(&mpeg_queue, MPEG_STOP, NULL);
#else
playing = false;
#endif #endif
} }
@ -1066,6 +1072,8 @@ void mpeg_pause(void)
{ {
#ifndef SIMULATOR #ifndef SIMULATOR
queue_post(&mpeg_queue, MPEG_PAUSE, NULL); queue_post(&mpeg_queue, MPEG_PAUSE, NULL);
#else
playing = false;
#endif #endif
} }
@ -1073,6 +1081,8 @@ void mpeg_resume(void)
{ {
#ifndef SIMULATOR #ifndef SIMULATOR
queue_post(&mpeg_queue, MPEG_RESUME, NULL); queue_post(&mpeg_queue, MPEG_RESUME, NULL);
#else
playing = true;
#endif #endif
} }
@ -1080,6 +1090,8 @@ void mpeg_next(void)
{ {
#ifndef SIMULATOR #ifndef SIMULATOR
queue_post(&mpeg_queue, MPEG_NEXT, NULL); queue_post(&mpeg_queue, MPEG_NEXT, NULL);
#else
playing = true;
#endif #endif
} }
@ -1087,16 +1099,14 @@ void mpeg_prev(void)
{ {
#ifndef SIMULATOR #ifndef SIMULATOR
queue_post(&mpeg_queue, MPEG_PREV, NULL); queue_post(&mpeg_queue, MPEG_PREV, NULL);
#else
playing = true;
#endif #endif
} }
bool mpeg_is_playing(void) bool mpeg_is_playing(void)
{ {
#ifndef SIMULATOR
return playing || play_pending; return playing || play_pending;
#else
return false;
#endif
} }
#ifndef SIMULATOR #ifndef SIMULATOR