summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Hohmuth <sideral@rockbox.org>2011-02-08 20:31:27 +0000
committerMichael Hohmuth <sideral@rockbox.org>2011-02-08 20:31:27 +0000
commit4844142e161f24102bbe45f1f6207f3468649e78 (patch)
treeadca9668af5d87840362d46d33b0f47b6565f6fc
parentf0ce1886814d597b5bbe58fe36556356d42b7db6 (diff)
downloadrockbox-4844142e161f24102bbe45f1f6207f3468649e78.tar.gz
rockbox-4844142e161f24102bbe45f1f6207f3468649e78.zip
Do not update resume information and do not log statistics when a
track is interrupted within the first 15 seconds. Regard a rewind to 0:00 as a track restart (updating resume position / playback statistics before the rewind and starting the 15 s delay). This allows skipping forward across an unplayed track without changing its resume offset. Also, it is possible to skip backward to the previous track after rewinding to the current track to 0:00 (pressing Left twice) without losing the current track's resume position. Initially contributed by Dave Slusher Caveats: * Works only for SWCODEC * Skipping forward without altering the resume position does not work when skip to outro has been turned on. * The 15-second window in which the resume offset will not be updated should start at the initial resume position, not at 0:00. This would allow skipping over partially played tracks without altering the resume position. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29250 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/playback.c9
-rw-r--r--apps/tagtree.c11
-rw-r--r--docs/CREDITS1
3 files changed, 18 insertions, 3 deletions
diff --git a/apps/playback.c b/apps/playback.c
index e71e06b92c..e33a4ac507 100644
--- a/apps/playback.c
+++ b/apps/playback.c
@@ -2013,6 +2013,15 @@ static void audio_thread(void)
2013 LOGFQUEUE("audio < Q_AUDIO_FF_REWIND"); 2013 LOGFQUEUE("audio < Q_AUDIO_FF_REWIND");
2014 if (!playing) 2014 if (!playing)
2015 break; 2015 break;
2016
2017 if ((long)ev.data == 0)
2018 {
2019 /* About to restart the track - send track finish
2020 events if not already done. */
2021 if (thistrack_id3 == audio_current_track())
2022 send_event(PLAYBACK_EVENT_TRACK_FINISH, thistrack_id3);
2023 }
2024
2016 if (automatic_skip) 2025 if (automatic_skip)
2017 { 2026 {
2018 /* An automatic track skip is in progress. Finalize it, 2027 /* An automatic track skip is in progress. Finalize it,
diff --git a/apps/tagtree.c b/apps/tagtree.c
index fa88a5941b..ecc9f44d4d 100644
--- a/apps/tagtree.c
+++ b/apps/tagtree.c
@@ -722,10 +722,15 @@ static void tagtree_track_finish_event(void *data)
722 } 722 }
723 tagcache_idx--; 723 tagcache_idx--;
724 724
725 /* Don't process unplayed tracks. */ 725 /* Don't process unplayed tracks, or tracks interrupted within the
726 if (id3->elapsed == 0) 726 first 15 seconds. */
727 if (id3->elapsed == 0
728#if CONFIG_CODEC == SWCODEC /* HWCODEC doesn't have automatic_skip */
729 || (id3->elapsed < 15 * 1000 && !automatic_skip)
730#endif
731 )
727 { 732 {
728 logf("not logging unplayed track"); 733 logf("not logging unplayed or skipped track");
729 return; 734 return;
730 } 735 }
731 736
diff --git a/docs/CREDITS b/docs/CREDITS
index 9bbfc70d9b..88b2948ee6 100644
--- a/docs/CREDITS
+++ b/docs/CREDITS
@@ -584,6 +584,7 @@ Ante Maretic
584Benjamin Brown 584Benjamin Brown
585Uwe Wiebach 585Uwe Wiebach
586Mikhail Titov 586Mikhail Titov
587Dave Slusher
587 588
588The libmad team 589The libmad team
589The wavpack team 590The wavpack team