summaryrefslogtreecommitdiff
path: root/firmware/mpeg.c
diff options
context:
space:
mode:
authorBjörn Stenberg <bjorn@haxx.se>2002-08-21 17:38:56 +0000
committerBjörn Stenberg <bjorn@haxx.se>2002-08-21 17:38:56 +0000
commit0c2e9f21e31422942001bf603f3d340b5a648136 (patch)
treef6ba531b33759edddfaa6c53ed2aa25379750b58 /firmware/mpeg.c
parent84cf9d446c68b577256c92b631d68bbeae6451b8 (diff)
Stays in pause mode after seek
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@1896 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/mpeg.c')
-rw-r--r--firmware/mpeg.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/firmware/mpeg.c b/firmware/mpeg.c
index 0c6a1a3355..0117102e57 100644
--- a/firmware/mpeg.c
+++ b/firmware/mpeg.c
@@ -285,7 +285,6 @@ static bool playing = false;
static bool play_pending = false;
#else
static int last_dma_tick = 0;
-static int pause_tick = 0;
#ifdef HAVE_MAS3507D
@@ -683,6 +682,8 @@ static void track_change(void)
static void mpeg_thread(void)
{
+ static int pause_tick = 0;
+ static unsigned int pause_track = 0;
struct event ev;
int len;
int free_space_left;
@@ -760,6 +761,7 @@ static void mpeg_thread(void)
paused = true;
playing = false;
pause_tick = current_tick;
+ pause_track = current_track_counter;
stop_dma();
break;
@@ -769,10 +771,13 @@ static void mpeg_thread(void)
paused = false;
if (!play_pending)
{
- playing = true;
- last_dma_tick += current_tick - pause_tick;
- pause_tick = 0;
- start_dma();
+ playing = true;
+ if ( current_track_counter == pause_track )
+ last_dma_tick += current_tick - pause_tick;
+ else
+ last_dma_tick = current_tick;
+ pause_tick = 0;
+ start_dma();
}
break;
@@ -1276,7 +1281,7 @@ void mpeg_prev(void)
#else
char* file = playlist_next(-1,NULL);
mp3info(&taginfo, file);
- current_track_counter--;
+ current_track_counter++;
playing = true;
#endif
}