forked from len0rd/rockbox
Pause time counting fix by Nate Nystrom
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@1449 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
1cf053982e
commit
d2018ebfc6
1 changed files with 5 additions and 1 deletions
|
|
@ -148,6 +148,7 @@ static struct {
|
||||||
#ifndef SIMULATOR
|
#ifndef SIMULATOR
|
||||||
static int last_tag = 0;
|
static int last_tag = 0;
|
||||||
static int last_dma_tick = 0;
|
static int last_dma_tick = 0;
|
||||||
|
static int pause_tick = 0;
|
||||||
|
|
||||||
#ifndef ARCHOS_RECORDER
|
#ifndef ARCHOS_RECORDER
|
||||||
static unsigned int bass_table[] =
|
static unsigned int bass_table[] =
|
||||||
|
|
@ -592,13 +593,16 @@ static void mpeg_thread(void)
|
||||||
DEBUGF("MPEG_PAUSE\n");
|
DEBUGF("MPEG_PAUSE\n");
|
||||||
/* Stop the current stream */
|
/* Stop the current stream */
|
||||||
playing = false;
|
playing = false;
|
||||||
|
pause_tick = current_tick;
|
||||||
stop_dma();
|
stop_dma();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case MPEG_RESUME:
|
case MPEG_RESUME:
|
||||||
DEBUGF("MPEG_RESUME\n");
|
DEBUGF("MPEG_RESUME\n");
|
||||||
/* Stop the current stream */
|
/* Continue the current stream */
|
||||||
playing = true;
|
playing = true;
|
||||||
|
last_dma_tick += current_tick - pause_tick;
|
||||||
|
pause_tick = 0;
|
||||||
start_dma();
|
start_dma();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue