summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--firmware/export/mpeg.h1
-rw-r--r--firmware/mpeg.c12
2 files changed, 13 insertions, 0 deletions
diff --git a/firmware/export/mpeg.h b/firmware/export/mpeg.h
index ff003e62f5..5625b03464 100644
--- a/firmware/export/mpeg.h
+++ b/firmware/export/mpeg.h
@@ -71,6 +71,7 @@ void mpeg_prev(void);
void mpeg_ff_rewind(int newtime);
void mpeg_flush_and_reload_tracks(void);
struct mp3entry* mpeg_current_track(void);
+struct mp3entry* mpeg_next_track(void);
bool mpeg_has_changed_track(void);
int mpeg_status(void);
#if defined(HAVE_MAS3587F) || defined(SIMULATOR)
diff --git a/firmware/mpeg.c b/firmware/mpeg.c
index ad4b75ea42..645e60fdcd 100644
--- a/firmware/mpeg.c
+++ b/firmware/mpeg.c
@@ -1960,6 +1960,18 @@ struct mp3entry* mpeg_current_track()
#endif /* #ifdef SIMULATOR */
}
+struct mp3entry* mpeg_next_track()
+{
+#ifdef SIMULATOR
+ return &taginfo;
+#else
+ if(num_tracks_in_memory() > 1)
+ return &(id3tags[(tag_read_idx+1) & MAX_ID3_TAGS_MASK]->id3);
+ else
+ return NULL;
+#endif /* #ifdef SIMULATOR */
+}
+
bool mpeg_has_changed_track(void)
{
if(last_track_counter != current_track_counter)