summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndree Buschmann <AndreeBuschmann@t-online.de>2011-11-29 20:36:11 +0000
committerAndree Buschmann <AndreeBuschmann@t-online.de>2011-11-29 20:36:11 +0000
commitbdaac8ba0415bbbbad8c381b6e26742cba886c65 (patch)
tree4b8a521efa1fe49daedb598b08e1963694ffe357
parent3c63cb29e945ae8e4af1a682f35f04cae5445e19 (diff)
downloadrockbox-bdaac8ba0415bbbbad8c381b6e26742cba886c65.tar.gz
rockbox-bdaac8ba0415bbbbad8c381b6e26742cba886c65.zip
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
-rw-r--r--apps/codecs/adx.c10
-rw-r--r--apps/metadata/adx.c10
-rw-r--r--manual/appendix/file_formats.tex2
3 files changed, 17 insertions, 5 deletions
diff --git a/apps/codecs/adx.c b/apps/codecs/adx.c
index cc7f0320be..0c67fc8d6e 100644
--- a/apps/codecs/adx.c
+++ b/apps/codecs/adx.c
@@ -149,7 +149,7 @@ enum codec_status codec_run(void)
149 /* Get loop data */ 149 /* Get loop data */
150 150
151 looping = 0; start_adr = 0; end_adr = 0; 151 looping = 0; start_adr = 0; end_adr = 0;
152 if (!memcmp(buf+0x10,"\x01\xF4\x03\x00",4)) { 152 if (!memcmp(buf+0x10,"\x01\xF4\x03",3)) {
153 /* Soul Calibur 2 style (type 03) */ 153 /* Soul Calibur 2 style (type 03) */
154 DEBUGF("ADX: type 03 found\n"); 154 DEBUGF("ADX: type 03 found\n");
155 /* check if header is too small for loop data */ 155 /* check if header is too small for loop data */
@@ -171,7 +171,7 @@ enum codec_status codec_run(void)
171 (buf[0x1f]) 171 (buf[0x1f])
172 )/32*channels*18+chanstart; 172 )/32*channels*18+chanstart;
173 } 173 }
174 } else if (!memcmp(buf+0x10,"\x01\xF4\x04\x00",4)) { 174 } else if (!memcmp(buf+0x10,"\x01\xF4\x04",3)) {
175 /* Standard (type 04) */ 175 /* Standard (type 04) */
176 DEBUGF("ADX: type 04 found\n"); 176 DEBUGF("ADX: type 04 found\n");
177 /* check if header is too small for loop data */ 177 /* check if header is too small for loop data */
@@ -196,6 +196,12 @@ enum codec_status codec_run(void)
196 DEBUGF("ADX: error, couldn't determine ADX type\n"); 196 DEBUGF("ADX: error, couldn't determine ADX type\n");
197 return CODEC_ERROR; 197 return CODEC_ERROR;
198 } 198 }
199
200 /* is file using encryption */
201 if (buf[0x13]==0x08) {
202 DEBUGF("ADX: error, encrypted ADX not supported\n");
203 return false;
204 }
199 205
200 if (looping) { 206 if (looping) {
201 DEBUGF("ADX: looped, start: %lx end: %lx\n",start_adr,end_adr); 207 DEBUGF("ADX: looped, start: %lx end: %lx\n",start_adr,end_adr);
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))
diff --git a/manual/appendix/file_formats.tex b/manual/appendix/file_formats.tex
index a256a2a735..3c361f7996 100644
--- a/manual/appendix/file_formats.tex
+++ b/manual/appendix/file_formats.tex
@@ -114,7 +114,7 @@
114 & Supports downmixing for playback of 5.1 streams in stereo\\ 114 & Supports downmixing for playback of 5.1 streams in stereo\\
115 ADX 115 ADX
116 & \fname{.adx} 116 & \fname{.adx}
117 & \\ 117 & Encrypted ADX is not supported.\\
118 Advanced Audio Coding 118 Advanced Audio Coding
119 & \fname{.m4a}, \fname{.m4b}, \fname{.mp4}, \fname{.rm}, \fname{.ra}, \fname{.rmvb} 119 & \fname{.m4a}, \fname{.m4b}, \fname{.mp4}, \fname{.rm}, \fname{.ra}, \fname{.rmvb}
120 \nopt{clipv1,c200v2}{ 120 \nopt{clipv1,c200v2}{