summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorRyan Jackson <rdjackso@rockbox.org>2005-07-24 04:17:34 +0000
committerRyan Jackson <rdjackso@rockbox.org>2005-07-24 04:17:34 +0000
commit795ce8b1a829eb36c051e0c5f2e62572b71ab70c (patch)
tree867e4d37553601249355abb810dbee1c449163ba /apps
parent255e1cf79cd30a1e39e279c65d046ee316072a59 (diff)
Changing tracks in REPEAT_ONE mode restarts the current track instead of crashing
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7232 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r--apps/playback.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/apps/playback.c b/apps/playback.c
index 88a48a7471..4756c8aed1 100644
--- a/apps/playback.c
+++ b/apps/playback.c
@@ -1246,7 +1246,7 @@ bool codec_request_next_track_callback(void)
return false;
logf("Request new track");
-
+
/* Advance to next track. */
if (ci.reload_codec && new_track > 0) {
if (!playlist_check(new_track))
@@ -1356,6 +1356,18 @@ static void initiate_track_change(int peek_index)
{
if (!playlist_check(peek_index))
return ;
+
+ if (global_settings.repeat_mode == REPEAT_ONE) {
+ if (!paused)
+ pcm_play_pause(false);
+
+ audio_ff_rewind(0);
+
+ if (!paused)
+ pcm_play_pause(true);
+
+ return;
+ }
/* Detect if disk is spinning.. */
if (filling) {