summaryrefslogtreecommitdiff
path: root/apps/playlist.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/playlist.c')
-rw-r--r--apps/playlist.c16
1 files changed, 1 insertions, 15 deletions
diff --git a/apps/playlist.c b/apps/playlist.c
index 2bdc1f39cc..f903458004 100644
--- a/apps/playlist.c
+++ b/apps/playlist.c
@@ -647,11 +647,7 @@ static int create_and_play_dir(int direction, bool play_last)
647 else 647 else
648 index = 0; 648 index = 0;
649 649
650#if (CONFIG_CODEC == SWCODEC)
651 current_playlist.started = true; 650 current_playlist.started = true;
652#else
653 playlist_start(index, 0, 0);
654#endif
655 } 651 }
656 652
657 /* we've overwritten the dircache when getting the next/previous dir, 653 /* we've overwritten the dircache when getting the next/previous dir,
@@ -1090,7 +1086,6 @@ static int calculate_step_count(const struct playlist_info *playlist, int steps)
1090 return steps; 1086 return steps;
1091} 1087}
1092 1088
1093#if CONFIG_CODEC == SWCODEC
1094/* Marks the index of the track to be skipped that is "steps" away from 1089/* Marks the index of the track to be skipped that is "steps" away from
1095 * current playing track. 1090 * current playing track.
1096 */ 1091 */
@@ -1100,7 +1095,7 @@ void playlist_skip_entry(struct playlist_info *playlist, int steps)
1100 1095
1101 if (playlist == NULL) 1096 if (playlist == NULL)
1102 playlist = &current_playlist; 1097 playlist = &current_playlist;
1103 1098
1104 /* need to account for already skipped tracks */ 1099 /* need to account for already skipped tracks */
1105 steps = calculate_step_count(playlist, steps); 1100 steps = calculate_step_count(playlist, steps);
1106 1101
@@ -1112,7 +1107,6 @@ void playlist_skip_entry(struct playlist_info *playlist, int steps)
1112 1107
1113 playlist->indices[index] |= PLAYLIST_SKIPPED; 1108 playlist->indices[index] |= PLAYLIST_SKIPPED;
1114} 1109}
1115#endif /* CONFIG_CODEC == SWCODEC */
1116 1110
1117/* 1111/*
1118 * returns the index of the track that is "steps" away from current playing 1112 * returns the index of the track that is "steps" away from current playing
@@ -2649,11 +2643,9 @@ const char* playlist_peek(int steps, char* buf, size_t buf_size)
2649 if (index < 0) 2643 if (index < 0)
2650 return NULL; 2644 return NULL;
2651 2645
2652#if CONFIG_CODEC == SWCODEC
2653 /* Just testing - don't care about the file name */ 2646 /* Just testing - don't care about the file name */
2654 if (!buf || !buf_size) 2647 if (!buf || !buf_size)
2655 return ""; 2648 return "";
2656#endif
2657 2649
2658 control_file = playlist->indices[index] & PLAYLIST_INSERT_TYPE_MASK; 2650 control_file = playlist->indices[index] & PLAYLIST_INSERT_TYPE_MASK;
2659 seek = playlist->indices[index] & PLAYLIST_SEEK_MASK; 2651 seek = playlist->indices[index] & PLAYLIST_SEEK_MASK;
@@ -2730,11 +2722,7 @@ int playlist_next(int steps)
2730 sort_playlist(playlist, false, false); 2722 sort_playlist(playlist, false, false);
2731 randomise_playlist(playlist, current_tick, false, true); 2723 randomise_playlist(playlist, current_tick, false, true);
2732 2724
2733#if CONFIG_CODEC == SWCODEC
2734 playlist->started = true; 2725 playlist->started = true;
2735#else
2736 playlist_start(0, 0, 0);
2737#endif
2738 playlist->index = 0; 2726 playlist->index = 0;
2739 index = 0; 2727 index = 0;
2740 } 2728 }
@@ -2780,7 +2768,6 @@ int playlist_next(int steps)
2780 return index; 2768 return index;
2781} 2769}
2782 2770
2783#if CONFIG_CODEC == SWCODEC
2784/* try playing next or previous folder */ 2771/* try playing next or previous folder */
2785bool playlist_next_dir(int direction) 2772bool playlist_next_dir(int direction)
2786{ 2773{
@@ -2790,7 +2777,6 @@ bool playlist_next_dir(int direction)
2790 2777
2791 return create_and_play_dir(direction, false) >= 0; 2778 return create_and_play_dir(direction, false) >= 0;
2792} 2779}
2793#endif /* CONFIG_CODEC == SWCODEC */
2794 2780
2795/* Get resume info for current playing song. If return value is -1 then 2781/* Get resume info for current playing song. If return value is -1 then
2796 settings shouldn't be saved. */ 2782 settings shouldn't be saved. */