diff options
author | Linus Nielsen Feltzing <linus@haxx.se> | 2002-08-28 10:54:01 +0000 |
---|---|---|
committer | Linus Nielsen Feltzing <linus@haxx.se> | 2002-08-28 10:54:01 +0000 |
commit | 97bead39e421a97f81f6d0f960c0e3457f502926 (patch) | |
tree | b8e27a4aa51928f0b63e27dca4b2f0bb4196fbfa /firmware | |
parent | ea8deec51c13f9193dd2ccf7fcb0aeb938b921d3 (diff) | |
download | rockbox-97bead39e421a97f81f6d0f960c0e3457f502926.tar.gz rockbox-97bead39e421a97f81f6d0f960c0e3457f502926.zip |
Simulator fixes
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@2026 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware')
-rw-r--r-- | firmware/mpeg.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/firmware/mpeg.c b/firmware/mpeg.c index 8700745a53..d2aa13b446 100644 --- a/firmware/mpeg.c +++ b/firmware/mpeg.c @@ -301,6 +301,7 @@ static void set_elapsed(struct mp3entry* id3) static bool paused; /* playback is paused */ #ifdef SIMULATOR +static bool is_playing = false; static bool playing = false; static bool play_pending = false; #else @@ -1303,7 +1304,7 @@ void mpeg_play(int offset) int steps=0; do { - trackname = playlist_next( steps, NULL ); + trackname = playlist_peek( steps ); if (!trackname) break; if(mp3info(&taginfo, trackname)) { @@ -1311,8 +1312,10 @@ void mpeg_play(int offset) steps++; continue; } + playlist_next(steps); taginfo.offset = offset; set_elapsed(&taginfo); + is_playing = true; playing = true; break; } while(1); @@ -1326,6 +1329,7 @@ void mpeg_stop(void) #ifndef SIMULATOR queue_post(&mpeg_queue, MPEG_STOP, NULL); #else + is_playing = false; playing = false; #endif } @@ -1335,6 +1339,7 @@ void mpeg_pause(void) #ifndef SIMULATOR queue_post(&mpeg_queue, MPEG_PAUSE, NULL); #else + is_playing = false; playing = false; paused = true; #endif @@ -1345,6 +1350,7 @@ void mpeg_resume(void) #ifndef SIMULATOR queue_post(&mpeg_queue, MPEG_RESUME, NULL); #else + is_playing = true; playing = true; paused = false; #endif @@ -1360,15 +1366,17 @@ void mpeg_next(void) int index; do { - file = playlist_next(steps, &index); + file = playlist_peek(steps); if(!file) break; if(mp3info(&taginfo, file)) { steps++; continue; } + index = playlist_next(steps); current_track_counter++; taginfo.index = index; + is_playing = true; playing = true; break; } while(1); @@ -1385,15 +1393,17 @@ void mpeg_prev(void) int index; do { - file = playlist_next(steps, &index); + file = playlist_peek(steps); if(!file) break; if(mp3info(&taginfo, file)) { steps--; continue; } + index = playlist_next(steps); current_track_counter++; taginfo.index = index; + is_playing = true; playing = true; break; } while(1); |