diff options
Diffstat (limited to 'apps/playback.c')
-rw-r--r-- | apps/playback.c | 23 |
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) | |||
1819 | } | 1819 | } |
1820 | /* Automatic track change w/crossfade, if not in "Track Skip Only" mode. */ | 1820 | /* Automatic track change w/crossfade, if not in "Track Skip Only" mode. */ |
1821 | else if (pcmbuf_is_crossfade_enabled() && !pcmbuf_is_crossfade_active() | 1821 | else if (pcmbuf_is_crossfade_enabled() && !pcmbuf_is_crossfade_active() |
1822 | && global_settings.crossfade != 2) | 1822 | && global_settings.crossfade != CROSSFADE_ENABLE_TRACKSKIP ) |
1823 | { | 1823 | { |
1824 | pcmbuf_crossfade_init(false); | 1824 | if ( global_settings.crossfade |
1825 | codec_track_changed(); | 1825 | == CROSSFADE_ENABLE_SHUFFLE_AND_TRACKSKIP ) |
1826 | { | ||
1827 | if (global_settings.playlist_shuffle) /* shuffle mode is on, so crossfade: */ | ||
1828 | { | ||
1829 | pcmbuf_crossfade_init(false); | ||
1830 | codec_track_changed(); | ||
1831 | } | ||
1832 | else /* shuffle mode is off, so do a gapless track change */ | ||
1833 | { | ||
1834 | pcmbuf_set_position_callback(codec_pcmbuf_position_callback); /* Gapless playback */ | ||
1835 | pcmbuf_set_event_handler(codec_pcmbuf_track_changed_callback); /* copied from below */ | ||
1836 | } | ||
1837 | } | ||
1838 | else /* normal crossfade: */ | ||
1839 | { | ||
1840 | pcmbuf_crossfade_init(false); | ||
1841 | codec_track_changed(); | ||
1842 | } | ||
1826 | } | 1843 | } |
1827 | /* Gapless playback. */ | 1844 | /* Gapless playback. */ |
1828 | else | 1845 | else |