From 212e7808d5f39e1d7fc1bd487de8f13c50d136f2 Mon Sep 17 00:00:00 2001 From: Richard Quirk Date: Sun, 9 Dec 2012 21:04:17 +0100 Subject: 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 http://www.rockbox.org/tracker/6411 Bump plugin API and nvram version numbers Change-Id: I156f61a9f1ac428b4a682bc680379cb6b60b1b10 Reviewed-on: http://gerrit.rockbox.org/372 Tested-by: Jonathan Gordon Reviewed-by: Jonathan Gordon --- apps/plugin.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'apps/plugin.c') diff --git a/apps/plugin.c b/apps/plugin.c index 9992d85620..24443b58d9 100644 --- a/apps/plugin.c +++ b/apps/plugin.c @@ -155,6 +155,9 @@ static const struct plugin_api rockbox_api = { lcd_double_height, #else &lcd_static_framebuffer[0][0], + lcd_set_viewport, + lcd_set_framebuffer, + lcd_bmp_part, lcd_update_rect, lcd_set_drawmode, lcd_get_drawmode, @@ -287,6 +290,7 @@ static const struct plugin_api rockbox_api = { #ifdef HAVE_LCD_BITMAP viewportmanager_theme_enable, viewportmanager_theme_undo, + viewport_set_fullscreen, #endif /* list */ @@ -583,6 +587,7 @@ static const struct plugin_api rockbox_api = { mixer_channel_stop, mixer_channel_set_amplitude, mixer_channel_get_bytes_waiting, + mixer_channel_set_buffer_hook, system_sound_play, keyclick_click, @@ -590,6 +595,7 @@ static const struct plugin_api rockbox_api = { /* playback control */ playlist_amount, playlist_resume, + playlist_resume_track, playlist_start, playlist_add, playlist_sync, @@ -792,14 +798,6 @@ static const struct plugin_api rockbox_api = { /* new stuff at the end, sort into place next time the API gets incompatible */ -#ifdef HAVE_LCD_BITMAP -#if CONFIG_CODEC == SWCODEC - mixer_channel_set_buffer_hook, -#endif - lcd_set_viewport, - viewport_set_fullscreen, - lcd_set_framebuffer, -#endif }; int plugin_load(const char* plugin, const void* parameter) -- cgit v1.2.3