summaryrefslogtreecommitdiff
path: root/apps/settings.h
diff options
context:
space:
mode:
authorMichael Sevakis <jethead71@rockbox.org>2013-07-14 07:59:39 -0400
committerMichael Sevakis <jethead71@rockbox.org>2014-03-10 04:12:30 +0100
commit31b712286721dd606940c7b557d03e3f714b9604 (patch)
tree8c4a4cc32e9000ea721ebb23aa3c0129ca97bf53 /apps/settings.h
parentdda54b85daa83b7803b4fb189ab45859f96ff3f9 (diff)
downloadrockbox-31b712286721dd606940c7b557d03e3f714b9604.tar.gz
rockbox-31b712286721dd606940c7b557d03e3f714b9604.zip
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 <jethead71@rockbox.org> Tested: Michael Sevakis <jethead71@rockbox.org>
Diffstat (limited to 'apps/settings.h')
-rw-r--r--apps/settings.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/apps/settings.h b/apps/settings.h
index 5b876d3e67..60658f6857 100644
--- a/apps/settings.h
+++ b/apps/settings.h
@@ -266,6 +266,7 @@ struct system_status
266{ 266{
267 int resume_index; /* index in playlist (-1 for no active resume) */ 267 int resume_index; /* index in playlist (-1 for no active resume) */
268 uint32_t resume_crc32; /* crc32 of the name of the file */ 268 uint32_t resume_crc32; /* crc32 of the name of the file */
269 uint32_t resume_elapsed; /* elapsed time in last file */
269 uint32_t resume_offset; /* byte offset in mp3 file */ 270 uint32_t resume_offset; /* byte offset in mp3 file */
270 int runtime; /* current runtime since last charge */ 271 int runtime; /* current runtime since last charge */
271 int topruntime; /* top known runtime */ 272 int topruntime; /* top known runtime */
@@ -282,6 +283,7 @@ struct system_status
282#ifdef HAVE_LCD_BITMAP 283#ifdef HAVE_LCD_BITMAP
283 int font_id[NB_SCREENS]; /* font id of the settings font for each screen */ 284 int font_id[NB_SCREENS]; /* font id of the settings font for each screen */
284#endif 285#endif
286
285}; 287};
286 288
287struct user_settings 289struct user_settings