diff options
author | Miika Pekkarinen <miipekk@ihme.org> | 2006-01-19 18:21:12 +0000 |
---|---|---|
committer | Miika Pekkarinen <miipekk@ihme.org> | 2006-01-19 18:21:12 +0000 |
commit | 61cd604369ce3aaa437dd9b91a700a6c4393df89 (patch) | |
tree | 4743c79b23223e4c46183fc0450a74b5f02d8a80 /apps | |
parent | f3d13f99059a3b47f85729b6c0909e1d76d6bb7b (diff) |
Don't start playback twice if pcm buffer runs empty when switching to
the next directory.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8390 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r-- | apps/playback.c | 36 |
1 files changed, 20 insertions, 16 deletions
diff --git a/apps/playback.c b/apps/playback.c index 71c592b3b5..dfe0ab7300 100644 --- a/apps/playback.c +++ b/apps/playback.c @@ -1290,6 +1290,7 @@ static void audio_clear_track_entries(bool buffered_only) static void audio_stop_playback(bool resume) { + logf("stop_playback:%d", resume); paused = false; if (playing) playlist_update_resume_info(resume ? audio_current_track() : NULL); @@ -1526,7 +1527,7 @@ static int skip_next_track(void) { logf("Loading from disk..."); ci.reload_codec = true; - queue_post(&audio_queue, AUDIO_PLAY, 0); + //queue_post(&audio_queue, AUDIO_PLAY, 0); return SKIP_OK_DISK; } @@ -2026,22 +2027,25 @@ struct mp3entry* audio_current_track(void) if (track_count > 0 && cur_ti->taginfo_ready) return (struct mp3entry *)&cur_ti->id3; - else { - filename = playlist_peek(0); - if (!filename) - filename = "No file!"; - p = strrchr(filename, '/'); - if (!p) - p = filename; - else - p++; - - memset(&temp_id3, 0, sizeof(struct mp3entry)); - strncpy(temp_id3.path, p, sizeof(temp_id3.path)-1); - temp_id3.title = &temp_id3.path[0]; - return &temp_id3; - } + filename = playlist_peek(0); + if (!filename) + filename = "No file!"; + + // if (tagcache_fill_tags(&temp_id3, filename)) + // return &temp_id3; + + p = strrchr(filename, '/'); + if (!p) + p = filename; + else + p++; + + memset(&temp_id3, 0, sizeof(struct mp3entry)); + strncpy(temp_id3.path, p, sizeof(temp_id3.path)-1); + temp_id3.title = &temp_id3.path[0]; + + return &temp_id3; } struct mp3entry* audio_next_track(void) |