summaryrefslogtreecommitdiffstats
path: root/apps/cuesheet.c
diff options
context:
space:
mode:
authorJens Arnold <amiconn@rockbox.org>2007-03-01 00:26:24 +0000
committerJens Arnold <amiconn@rockbox.org>2007-03-01 00:26:24 +0000
commit509a96dd5141dbb9edeadf4480d8aa632b563a27 (patch)
treef7419e2c6865d3d6d1b6501d97d473a2b39845b4 /apps/cuesheet.c
parent35ad10be598ccfb0a0394d6def18fa32c74d3d9d (diff)
downloadrockbox-509a96dd5141dbb9edeadf4480d8aa632b563a27.tar.gz
rockbox-509a96dd5141dbb9edeadf4480d8aa632b563a27.tar.bz2
rockbox-509a96dd5141dbb9edeadf4480d8aa632b563a27.zip
Hook up .cue file detection via a callback klugde on HWCODEC, to make cue sheet support actually work.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12526 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/cuesheet.c')
-rw-r--r--apps/cuesheet.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/apps/cuesheet.c b/apps/cuesheet.c
index 7a5eb32193..2f36ff0212 100644
--- a/apps/cuesheet.c
+++ b/apps/cuesheet.c
@@ -40,12 +40,22 @@
#include "playback.h"
#include "cuesheet.h"
+#if CONFIG_CODEC != SWCODEC
+/* special trickery because the hwcodec playback engine is in firmware/ */
+static bool cuesheet_handler(const char *filename)
+{
+ return cuesheet_is_enabled() && look_for_cuesheet_file(filename);
+}
+#endif
void cuesheet_init(void)
{
if (global_settings.cuesheet) {
curr_cue = (struct cuesheet *)buffer_alloc(sizeof(struct cuesheet));
temp_cue = (struct cuesheet *)buffer_alloc(sizeof(struct cuesheet));
+#if CONFIG_CODEC != SWCODEC
+ audio_set_cuesheet_callback(cuesheet_handler);
+#endif
} else {
curr_cue = NULL;
temp_cue = NULL;