diff options
Diffstat (limited to 'apps/metadata/adx.c')
-rw-r--r-- | apps/metadata/adx.c | 10 |
1 files changed, 8 insertions, 2 deletions
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) | |||
73 | id3->filesize = filesize(fd); | 73 | id3->filesize = filesize(fd); |
74 | 74 | ||
75 | /* get loop info */ | 75 | /* get loop info */ |
76 | if (!memcmp(buf+0x10,"\x01\xF4\x03\x00",4)) { | 76 | if (!memcmp(buf+0x10,"\x01\xF4\x03",3)) { |
77 | /* Soul Calibur 2 style (type 03) */ | 77 | /* Soul Calibur 2 style (type 03) */ |
78 | DEBUGF("get_adx_metadata: type 03 found\n"); | 78 | DEBUGF("get_adx_metadata: type 03 found\n"); |
79 | /* check if header is too small for loop data */ | 79 | /* check if header is too small for loop data */ |
@@ -83,7 +83,7 @@ bool get_adx_metadata(int fd, struct mp3entry* id3) | |||
83 | end_adr = get_long_be(&buf[0x28]); | 83 | end_adr = get_long_be(&buf[0x28]); |
84 | start_adr = get_long_be(&buf[0x1c])/32*channels*18+chanstart; | 84 | start_adr = get_long_be(&buf[0x1c])/32*channels*18+chanstart; |
85 | } | 85 | } |
86 | } else if (!memcmp(buf+0x10,"\x01\xF4\x04\x00",4)) { | 86 | } else if (!memcmp(buf+0x10,"\x01\xF4\x04",3)) { |
87 | /* Standard (type 04) */ | 87 | /* Standard (type 04) */ |
88 | DEBUGF("get_adx_metadata: type 04 found\n"); | 88 | DEBUGF("get_adx_metadata: type 04 found\n"); |
89 | /* check if header is too small for loop data */ | 89 | /* check if header is too small for loop data */ |
@@ -98,6 +98,12 @@ bool get_adx_metadata(int fd, struct mp3entry* id3) | |||
98 | return false; | 98 | return false; |
99 | } | 99 | } |
100 | 100 | ||
101 | /* is file using encryption */ | ||
102 | if (buf[0x13]==0x08) { | ||
103 | DEBUGF("get_adx_metadata: error, encrypted ADX not supported\n"); | ||
104 | return false; | ||
105 | } | ||
106 | |||
101 | if (looping) { | 107 | if (looping) { |
102 | /* 2 loops, 10 second fade */ | 108 | /* 2 loops, 10 second fade */ |
103 | id3->length = (start_adr-chanstart + 2*(end_adr-start_adr)) | 109 | id3->length = (start_adr-chanstart + 2*(end_adr-start_adr)) |