summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Giacomelli <giac2000@hotmail.com>2011-01-02 03:48:40 +0000
committerMichael Giacomelli <giac2000@hotmail.com>2011-01-02 03:48:40 +0000
commitcacc64a4feef33dfd2aef2a1092f110ac196382b (patch)
treebaddda51b0d0aa7ea973ce02dc199a7acb064cc3
parent66e8fc0f0d05d926a90e8d9991f78b7a855eb7f3 (diff)
downloadrockbox-cacc64a4feef33dfd2aef2a1092f110ac196382b.zip
rockbox-cacc64a4feef33dfd2aef2a1092f110ac196382b.tar.gz
rockbox-cacc64a4feef33dfd2aef2a1092f110ac196382b.tar.bz2
rockbox-cacc64a4feef33dfd2aef2a1092f110ac196382b.tar.xz
Blind commit a 'fix' for automatic resume on HWCODEC since I don't understand HWCODEC and have no way to test builds for it. For now just disable it. In the long term it would be nice to support this on HWCODEC, or failing that, clean this up a little more.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28943 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/menus/settings_menu.c4
-rw-r--r--apps/settings_list.c2
-rw-r--r--apps/tagcache.c2
-rw-r--r--apps/tagtree.c10
4 files changed, 16 insertions, 2 deletions
diff --git a/apps/menus/settings_menu.c b/apps/menus/settings_menu.c
index e609a40..cc3871a 100644
--- a/apps/menus/settings_menu.c
+++ b/apps/menus/settings_menu.c
@@ -425,8 +425,10 @@ MAKE_MENU(hotkey_menu, ID2P(LANG_HOTKEY), 0, Icon_NOICON,
/* SETTINGS MENU */
#ifdef HAVE_TAGCACHE
+#if CONFIG_CODEC == SWCODEC
MENUITEM_SETTING(autoresume_enable, &global_settings.autoresume_enable, NULL);
#endif
+#endif
static struct browse_folder_info langs = { LANG_DIR, SHOW_LNG };
@@ -442,7 +444,9 @@ MAKE_MENU(settings_menu_item, ID2P(LANG_GENERAL_SETTINGS), 0,
&display_menu, &system_menu,
&bookmark_settings_menu,
#ifdef HAVE_TAGCACHE
+#if CONFIG_CODEC == SWCODEC
&autoresume_enable,
+#endif
#endif
&browse_langs, &voice_settings_menu,
#ifdef HAVE_HOTKEY
diff --git a/apps/settings_list.c b/apps/settings_list.c
index 3da5f1d..39de65c 100644
--- a/apps/settings_list.c
+++ b/apps/settings_list.c
@@ -1257,11 +1257,13 @@ const struct settings_list settings[] = {
ID2P(LANG_RANDOM)),
#ifdef HAVE_TAGCACHE
+#if CONFIG_CODEC == SWCODEC
BOOL_SETTING(0, autoresume_enable, LANG_AUTORESUME_ENABLE, false,
"autoresume enable", off_on,
LANG_AUTORESUME_ENABLE_YES, LANG_SET_BOOL_NO, NULL),
OFFON_SETTING(0, runtimedb, LANG_RUNTIMEDB_ACTIVE, false,
"gather runtime data", NULL),
+#endif
#endif
#if CONFIG_CODEC == SWCODEC
diff --git a/apps/tagcache.c b/apps/tagcache.c
index 1d90eee..b3a16a3 100644
--- a/apps/tagcache.c
+++ b/apps/tagcache.c
@@ -1695,12 +1695,14 @@ bool tagcache_fill_tags(struct mp3entry *id3, const char *filename)
if (id3->bitrate == 0)
id3->bitrate = 1;
+#if CONFIG_CODEC == SWCODEC
if (global_settings.autoresume_enable)
{
id3->offset = get_tag_numeric(entry, tag_lastoffset, idx_id);
logf("tagcache_fill_tags: Set offset for %s to %lX\n",
id3->title, id3->offset);
}
+#endif
return true;
}
diff --git a/apps/tagtree.c b/apps/tagtree.c
index 8ebac0b..4673af3 100644
--- a/apps/tagtree.c
+++ b/apps/tagtree.c
@@ -170,7 +170,9 @@ static int current_entry_count;
static struct tree_context *tc;
+#if CONFIG_CODEC == SWCODEC
extern bool automatic_skip; /* Who initiated in-progress skip? (C/A-) */
+#endif
static int get_token_str(char *buf, int size)
{
@@ -677,7 +679,8 @@ static void tagtree_buffer_event(void *data)
logf("-> %ld/%ld", id3->playcount, id3->playtime);
}
-
+
+ #if CONFIG_CODEC == SWCODEC
if (global_settings.autoresume_enable)
{
/* Load current file resume offset if not already defined (by
@@ -690,7 +693,8 @@ static void tagtree_buffer_event(void *data)
str_or_empty(id3->title), id3->offset);
}
}
-
+ #endif
+
/* Store our tagcache index pointer. */
id3->tagcache_idx = tcs.idx_id+1;
@@ -753,6 +757,7 @@ static void tagtree_track_finish_event(void *data)
tagcache_update_numeric(tagcache_idx, tag_lastplayed, lastplayed);
}
+#if CONFIG_CODEC == SWCODEC
if (global_settings.autoresume_enable)
{
unsigned long offset
@@ -763,6 +768,7 @@ static void tagtree_track_finish_event(void *data)
logf("tagtree_track_finish_event: Save offset for %s: %lX",
str_or_empty(id3->title), offset);
}
+#endif
}
bool tagtree_export(void)