From 31b712286721dd606940c7b557d03e3f714b9604 Mon Sep 17 00:00:00 2001 From: Michael Sevakis Date: Sun, 14 Jul 2013 07:59:39 -0400 Subject: Implement time-based resume and playback start. This complements offset-based resume and playback start funcionality. The implementation is global on both HWCODEC and SWCODEC. Basically, if either the specified elapsed or offset are non-zero, it indicates a mid-track resume. To resume by time only, set elapsed to nonzero and offset to zero. To resume by offset only, set offset to nonzero and elapsed to zero. Which one the codec uses and which has priority is up to the codec; however, using an elapsed time covers more cases: * Codecs not able to use an offset such as VGM or other atomic formats * Starting playback at a nonzero elapsed time from a source that contains no offset, such as a cuesheet The change re-versions pretty much everything from tagcache to nvram. Change-Id: Ic7aebb24e99a03ae99585c5e236eba960d163f38 Reviewed-on: http://gerrit.rockbox.org/516 Reviewed-by: Michael Sevakis Tested: Michael Sevakis --- apps/playlist.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'apps/playlist.h') diff --git a/apps/playlist.h b/apps/playlist.h index d80d8aa2ee..6314e9a6ee 100644 --- a/apps/playlist.h +++ b/apps/playlist.h @@ -133,8 +133,10 @@ int playlist_add(const char *filename); int playlist_shuffle(int random_seed, int start_index); unsigned int playlist_get_filename_crc32(struct playlist_info *playlist, int index); -void playlist_resume_track(int start_index, unsigned int crc, int offset); -void playlist_start(int start_index, int offset); +void playlist_resume_track(int start_index, unsigned int crc, + unsigned long elapsed, unsigned long offset); +void playlist_start(int start_index, unsigned long elapsed, + unsigned long offset); bool playlist_check(int steps); const char *playlist_peek(int steps, char* buf, size_t buf_size); int playlist_next(int steps); -- cgit