path: root/apps/settings.h
diff options
authorRichard Quirk <>2012-12-09 21:04:17 +0100
committerJonathan Gordon <>2013-01-02 08:29:38 +0100
commit212e7808d5f39e1d7fc1bd487de8f13c50d136f2 (patch)
treedc16ed3fc3a4857554e0d58d4a277d558eefab77 /apps/settings.h
parent17181ecf30d2f7c73eba73309a35e770fab2c7ca (diff)
Use crc32 of filename to resume tracks
As well as using an index, which breaks when a file is added or removed, use the crc32 of the filename. When the crc32 check passes the index is used directly. When it fails, the slow path is taken checking each file name in the playlist until the right crc is found. If that fails the playlist is started from the beginning. See Bump plugin API and nvram version numbers Change-Id: I156f61a9f1ac428b4a682bc680379cb6b60b1b10 Reviewed-on: Tested-by: Jonathan Gordon <> Reviewed-by: Jonathan Gordon <>
Diffstat (limited to 'apps/settings.h')
1 files changed, 1 insertions, 0 deletions
diff --git a/apps/settings.h b/apps/settings.h
index 2af29ce423..53ad70b24f 100644
--- a/apps/settings.h
+++ b/apps/settings.h
@@ -262,6 +262,7 @@ bool set_option(const char* string, const void* variable, enum optiontype type,
struct system_status
int resume_index; /* index in playlist (-1 for no active resume) */
+ uint32_t resume_crc32; /* crc32 of the name of the file */
uint32_t resume_offset; /* byte offset in mp3 file */
int runtime; /* current runtime since last charge */
int topruntime; /* top known runtime */