1
0
Fork 0
forked from len0rd/rockbox

Elapsed counter resets correctly when changing tracks.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6771 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Miika Pekkarinen 2005-06-20 06:49:21 +00:00
parent 12a0e221de
commit cf18f96b99
2 changed files with 5 additions and 3 deletions

View file

@ -239,6 +239,9 @@ void codec_set_elapsed_callback(unsigned int value)
{ {
unsigned int latency; unsigned int latency;
if (ci.stop_codec)
return ;
latency = audiobuffer_get_latency(); latency = audiobuffer_get_latency();
if (value < latency) { if (value < latency) {

View file

@ -367,8 +367,7 @@ unsigned int audiobuffer_get_latency(void)
int latency; int latency;
/* This has to be done better. */ /* This has to be done better. */
latency = (PCMBUF_SIZE - audiobuffer_free - audiobuffer_fillpos latency = (PCMBUF_SIZE - audiobuffer_free - CHUNK_SIZE)/4 / (44100/1000);
- CHUNK_SIZE)/4 / (44100/1000);
if (latency < 0) if (latency < 0)
latency = 0; latency = 0;