diff options
author | Magnus Holmgren <magnushol@gmail.com> | 2008-02-28 17:40:31 +0000 |
---|---|---|
committer | Magnus Holmgren <magnushol@gmail.com> | 2008-02-28 17:40:31 +0000 |
commit | 00b722ff22ffc298da4dafb5c4de301eb0ee027b (patch) | |
tree | 78b915d12116a91e2a843c80d736d9f3a33e746a /apps/playback.c | |
parent | bbe3f1f61c50e950015aa76f6c80050adeaf167d (diff) |
Fix bookmark resume when a track is playing.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16445 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/playback.c')
-rw-r--r-- | apps/playback.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/apps/playback.c b/apps/playback.c index fe01462ef6..ef6b8514c4 100644 --- a/apps/playback.c +++ b/apps/playback.c @@ -1221,11 +1221,15 @@ static bool codec_load_next_track(void) LOGFQUEUE("codec |< Q_CODEC_REQUEST_FAILED"); ci.new_track = 0; ci.stop_codec = true; + LOGFQUEUE("codec > audio Q_AUDIO_STOP"); + queue_post(&audio_queue, Q_AUDIO_STOP, 0); return false; default: LOGFQUEUE("codec |< default"); ci.stop_codec = true; + LOGFQUEUE("codec > audio Q_AUDIO_STOP"); + queue_post(&audio_queue, Q_AUDIO_STOP, 0); return false; } } @@ -1337,9 +1341,6 @@ static void codec_thread(void) if (!codec_load_next_track()) { - LOGFQUEUE("codec > audio Q_AUDIO_STOP"); - /* End of playlist */ - queue_post(&audio_queue, Q_AUDIO_STOP, 0); break; } } @@ -1356,9 +1357,6 @@ static void codec_thread(void) curtrack_id3.length - pcmbuf_get_latency(); sleep(1); } - LOGFQUEUE("codec > audio Q_AUDIO_STOP"); - /* End of playlist */ - queue_post(&audio_queue, Q_AUDIO_STOP, 0); break; } } @@ -2184,6 +2182,8 @@ static void audio_stop_playback(void) /* Save the current playing spot, or NULL if the playlist has ended */ playlist_update_resume_info(id3); + /* TODO: Create auto bookmark too? */ + prev_track_elapsed = curtrack_id3.elapsed; /* At end of playlist save current id3 (id3.elapsed!) to buffer and |