From bdaac8ba0415bbbbad8c381b6e26742cba886c65 Mon Sep 17 00:00:00 2001 From: Andree Buschmann Date: Tue, 29 Nov 2011 20:36:11 +0000 Subject: Rockbox does not support encrypted ADX. Clearly state this in the manual and the debug messages. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31094 a1c6a512-1295-4272-9138-f99709370657 --- apps/metadata/adx.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'apps/metadata/adx.c') diff --git a/apps/metadata/adx.c b/apps/metadata/adx.c index 4e18254d79..7c341b4835 100644 --- a/apps/metadata/adx.c +++ b/apps/metadata/adx.c @@ -73,7 +73,7 @@ bool get_adx_metadata(int fd, struct mp3entry* id3) id3->filesize = filesize(fd); /* get loop info */ - if (!memcmp(buf+0x10,"\x01\xF4\x03\x00",4)) { + if (!memcmp(buf+0x10,"\x01\xF4\x03",3)) { /* Soul Calibur 2 style (type 03) */ DEBUGF("get_adx_metadata: type 03 found\n"); /* check if header is too small for loop data */ @@ -83,7 +83,7 @@ bool get_adx_metadata(int fd, struct mp3entry* id3) end_adr = get_long_be(&buf[0x28]); start_adr = get_long_be(&buf[0x1c])/32*channels*18+chanstart; } - } else if (!memcmp(buf+0x10,"\x01\xF4\x04\x00",4)) { + } else if (!memcmp(buf+0x10,"\x01\xF4\x04",3)) { /* Standard (type 04) */ DEBUGF("get_adx_metadata: type 04 found\n"); /* check if header is too small for loop data */ @@ -98,6 +98,12 @@ bool get_adx_metadata(int fd, struct mp3entry* id3) return false; } + /* is file using encryption */ + if (buf[0x13]==0x08) { + DEBUGF("get_adx_metadata: error, encrypted ADX not supported\n"); + return false; + } + if (looping) { /* 2 loops, 10 second fade */ id3->length = (start_adr-chanstart + 2*(end_adr-start_adr)) -- cgit v1.2.3