diff options
Diffstat (limited to 'apps/playback.c')
-rw-r--r-- | apps/playback.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/apps/playback.c b/apps/playback.c index 486edf80b2..495629e5ea 100644 --- a/apps/playback.c +++ b/apps/playback.c | |||
@@ -272,6 +272,9 @@ struct thread_entry *codec_thread_p; | |||
272 | #ifdef PLAYBACK_VOICE | 272 | #ifdef PLAYBACK_VOICE |
273 | extern struct codec_api ci_voice; | 273 | extern struct codec_api ci_voice; |
274 | 274 | ||
275 | /* Play time of the previous track */ | ||
276 | unsigned long prev_track_elapsed; | ||
277 | |||
275 | static volatile bool voice_thread_start; | 278 | static volatile bool voice_thread_start; |
276 | static volatile bool voice_is_playing; | 279 | static volatile bool voice_is_playing; |
277 | static volatile bool voice_codec_loaded; | 280 | static volatile bool voice_codec_loaded; |
@@ -1630,6 +1633,8 @@ static bool codec_load_next_track(void) | |||
1630 | { | 1633 | { |
1631 | struct event ev; | 1634 | struct event ev; |
1632 | 1635 | ||
1636 | prev_track_elapsed = CUR_TI->id3.elapsed; | ||
1637 | |||
1633 | if (ci.seek_time) | 1638 | if (ci.seek_time) |
1634 | codec_seek_complete_callback(); | 1639 | codec_seek_complete_callback(); |
1635 | 1640 | ||
@@ -2912,6 +2917,11 @@ void audio_set_track_changed_event(void (*handler)(struct mp3entry *id3)) | |||
2912 | track_changed_callback = handler; | 2917 | track_changed_callback = handler; |
2913 | } | 2918 | } |
2914 | 2919 | ||
2920 | unsigned long audio_prev_elapsed(void) | ||
2921 | { | ||
2922 | return prev_track_elapsed; | ||
2923 | } | ||
2924 | |||
2915 | static void audio_stop_codec_flush(void) | 2925 | static void audio_stop_codec_flush(void) |
2916 | { | 2926 | { |
2917 | ci.stop_codec = true; | 2927 | ci.stop_codec = true; |