summaryrefslogtreecommitdiff
path: root/apps/playback.c
diff options
context:
space:
mode:
authorJonathan Gordon <rockbox@jdgordon.info>2006-12-19 01:26:37 +0000
committerJonathan Gordon <rockbox@jdgordon.info>2006-12-19 01:26:37 +0000
commit3bceded79373a43ee75487a5bd037723c92e089b (patch)
tree4c75cadc06d82818321318bc4b59aa385892b475 /apps/playback.c
parent89990b0ca851b88988531137127a3bbeea7aa717 (diff)
Accept FS#5344 by Mike Schmitt. Add a "shuffle and track skip" option to
crossfade. Bumps config versino, so SAVE SETTINGS before updating. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11811 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/playback.c')
-rw-r--r--apps/playback.c23
1 files changed, 20 insertions, 3 deletions
diff --git a/apps/playback.c b/apps/playback.c
index f2e029ba30..53dbe07823 100644
--- a/apps/playback.c
+++ b/apps/playback.c
@@ -1819,10 +1819,27 @@ static void codec_track_skip_done(bool was_manual)
}
/* Automatic track change w/crossfade, if not in "Track Skip Only" mode. */
else if (pcmbuf_is_crossfade_enabled() && !pcmbuf_is_crossfade_active()
- && global_settings.crossfade != 2)
+ && global_settings.crossfade != CROSSFADE_ENABLE_TRACKSKIP )
{
- pcmbuf_crossfade_init(false);
- codec_track_changed();
+ if ( global_settings.crossfade
+ == CROSSFADE_ENABLE_SHUFFLE_AND_TRACKSKIP )
+ {
+ if (global_settings.playlist_shuffle) /* shuffle mode is on, so crossfade: */
+ {
+ pcmbuf_crossfade_init(false);
+ codec_track_changed();
+ }
+ else /* shuffle mode is off, so do a gapless track change */
+ {
+ pcmbuf_set_position_callback(codec_pcmbuf_position_callback); /* Gapless playback */
+ pcmbuf_set_event_handler(codec_pcmbuf_track_changed_callback); /* copied from below */
+ }
+ }
+ else /* normal crossfade: */
+ {
+ pcmbuf_crossfade_init(false);
+ codec_track_changed();
+ }
}
/* Gapless playback. */
else