1
0
Fork 0
forked from len0rd/rockbox

(1) Wait for the MAS to run out of buffered data on fade out. Fixes bug #778930/#1189756. (2) Fade in/out from/to zero. (3) Always fade in 30 steps, independent of the global volume.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6463 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Jens Arnold 2005-05-13 00:16:14 +00:00
parent 61aa15969c
commit 03d08ecc25
3 changed files with 30 additions and 11 deletions

View file

@ -42,6 +42,7 @@ void mp3_play_data(const unsigned char* start, int size,
void (*get_more)(unsigned char** start, int* size) /* callback fn */
);
void mp3_play_pause(bool play);
bool mp3_pause_done(void);
void mp3_play_stop(void);
long mp3_get_playtime(void);
void mp3_reset_playtime(void);

View file

@ -542,6 +542,19 @@ void mp3_play_pause(bool play)
paused = true;
cumulative_ticks += current_tick - playstart_tick;
}
}
bool mp3_pause_done(void)
{
unsigned long frame_count;
if (!paused)
return false;
mas_readmem(MAS_BANK_D0, MAS_D0_MPEG_FRAME_COUNT, &frame_count, 1);
/* This works because the frame counter never wraps,
* i.e. zero always means lost sync. */
return frame_count == 0;
}
void mp3_play_stop(void)