From dece414749fa7155020e5794debfcb657e79fa66 Mon Sep 17 00:00:00 2001 From: Jens Arnold Date: Sun, 21 Aug 2005 21:15:32 +0000 Subject: Hooked up the runtime database on archos. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7376 a1c6a512-1295-4272-9138-f99709370657 --- apps/database.c | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) (limited to 'apps') diff --git a/apps/database.c b/apps/database.c index 1691e2221b..90cdc37f2c 100644 --- a/apps/database.c +++ b/apps/database.c @@ -43,7 +43,13 @@ #include "keyboard.h" #include "database.h" #include "autoconf.h" + +#if CONFIG_HWCODEC == MASNONE #include "playback.h" +#else +#include "mpeg.h" +#endif + #include "logf.h" /* internal functions */ @@ -328,9 +334,6 @@ void rundb_buffer_track(struct mp3entry *id, bool last_track) { int rundb_init(void) { -#if CONFIG_HWCODEC != MASNONE - return -1; -#else unsigned char* ptr = (char*)&rundbheader.version; #ifdef ROCKBOX_LITTLE_ENDIAN int i, *p; @@ -376,17 +379,13 @@ int rundb_init(void) } rundb_initialized = 1; -/* hooks disabled for archos, rendering the runtime database not working, - * re enable when these callbacks are implemented in mpeg.c */ -#if CONFIG_HWCODEC == MASNONE audio_set_track_buffer_event(&rundb_buffer_track); audio_set_track_changed_event(&rundb_track_change); audio_set_track_unbuffer_event(&rundb_unbuffer_track); logf("rundb inited."); -#endif + rundbsize=lseek(rundb_fd,0,SEEK_END); return 0; -#endif } void rundb_shutdown(void) @@ -394,11 +393,9 @@ void rundb_shutdown(void) if (rundb_fd >= 0) close(rundb_fd); rundb_initialized = 0; -#if CONFIG_HWCODEC == MASNONE audio_set_track_buffer_event(NULL); audio_set_track_unbuffer_event(NULL); audio_set_track_changed_event(NULL); -#endif } void writerundbheader(void) -- cgit v1.2.3