From 9d756e2760a0926aa416b22e276c4a5b2685e84e Mon Sep 17 00:00:00 2001 From: Miika Pekkarinen Date: Sat, 21 Jul 2007 17:35:19 +0000 Subject: Queue song statistical data to the tagcache system and update entirely in background. Fixes ratings disappearing or not saving in the DB at all. Fixes also UI delay when stopping playback and new statistics are committed to DB. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13955 a1c6a512-1295-4272-9138-f99709370657 --- apps/tagcache.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'apps/tagcache.h') diff --git a/apps/tagcache.h b/apps/tagcache.h index 70677c602b..3d80c6975f 100644 --- a/apps/tagcache.h +++ b/apps/tagcache.h @@ -63,6 +63,11 @@ enum tag_type { tag_artist = 0, tag_album, tag_genre, tag_title, /* Always strict align entries for best performance and binary compatability. */ #define TAGCACHE_STRICT_ALIGN 1 +/* Max events in the internal tagcache command queue. */ +#define TAGCACHE_COMMAND_QUEUE_LENGTH 32 +/* Idle time before committing events in the command queue. */ +#define TAGCACHE_COMMAND_QUEUE_COMMIT_DELAY HZ*2 + #define TAGCACHE_MAX_FILTERS 4 #define TAGCACHE_MAX_CLAUSES 32 @@ -170,6 +175,7 @@ long tagcache_increase_serial(void); long tagcache_get_serial(void); bool tagcache_import_changelog(void); bool tagcache_create_changelog(struct tagcache_search *tcs); +void tagcache_update_numeric(int idx_id, int tag, long data); bool tagcache_modify_numeric_entry(struct tagcache_search *tcs, int tag, long data); -- cgit