summaryrefslogtreecommitdiffstats
path: root/apps/pcmbuf.c
diff options
context:
space:
mode:
authorJeffrey Goode <jeffg7@gmail.com>2009-11-09 19:34:01 +0000
committerJeffrey Goode <jeffg7@gmail.com>2009-11-09 19:34:01 +0000
commitcc4d92c27058fca4e8f9817e1d06d8c75574d6f4 (patch)
treeaa03a144bf166cae82fbc1b83581efcc99038343 /apps/pcmbuf.c
parent874c91146402df8a47718e327558e8ceab0b482c (diff)
downloadrockbox-cc4d92c27058fca4e8f9817e1d06d8c75574d6f4.tar.gz
rockbox-cc4d92c27058fca4e8f9817e1d06d8c75574d6f4.tar.bz2
rockbox-cc4d92c27058fca4e8f9817e1d06d8c75574d6f4.zip
pcmbuf: simplify crossfade logic
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23593 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/pcmbuf.c')
-rw-r--r--apps/pcmbuf.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/apps/pcmbuf.c b/apps/pcmbuf.c
index 02c307df72..975d254424 100644
--- a/apps/pcmbuf.c
+++ b/apps/pcmbuf.c
@@ -502,9 +502,10 @@ static void start_crossfade_track_change(bool auto_skip)
void pcmbuf_start_track_change(bool auto_skip)
{
+ bool crossfade = false;
/* Manual track change (always crossfade or flush audio). */
if (!auto_skip)
- start_crossfade_track_change(false);
+ crossfade = true;
/* Automatic track change w/crossfade, if not in "Track Skip Only" mode. */
else if (pcmbuf_is_crossfade_enabled() && !pcmbuf_is_crossfade_active()
@@ -513,16 +514,15 @@ void pcmbuf_start_track_change(bool auto_skip)
if (global_settings.crossfade == CROSSFADE_ENABLE_SHUFFLE_AND_TRACKSKIP)
{
if (global_settings.playlist_shuffle)
- /* shuffle mode is on, so crossfade: */
- start_crossfade_track_change(true);
- else
- /* shuffle mode is off, so normal gapless playback */
- start_gapless_track_change();
+ crossfade = true;
}
else
- /* normal crossfade: */
- start_crossfade_track_change(true);
+ crossfade = true;
}
+
+ if (crossfade)
+ /* crossfade to next track */
+ start_crossfade_track_change(auto_skip);
else
/* normal gapless playback. */
start_gapless_track_change();