summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndree Buschmann <AndreeBuschmann@t-online.de>2010-03-12 18:47:13 +0000
committerAndree Buschmann <AndreeBuschmann@t-online.de>2010-03-12 18:47:13 +0000
commit2ac401f4861e16c8c26517348f4b96b6dfeed41a (patch)
tree9b2d0b4d8cbdbeec9e5f0975f3393dbcaff80901
parentc82cac4c3d6d38b8df8e789c1b31a85cf2bd638e (diff)
downloadrockbox-2ac401f4861e16c8c26517348f4b96b6dfeed41a.tar.gz
rockbox-2ac401f4861e16c8c26517348f4b96b6dfeed41a.zip
Make atrac3 streams in wav containers work again (error was introduced with r24782). Add additional info to atrac3 debug information.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25134 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/codecs/atrac3_oma.c2
-rw-r--r--apps/codecs/atrac3_rm.c2
-rw-r--r--apps/metadata/wave.c4
3 files changed, 5 insertions, 3 deletions
diff --git a/apps/codecs/atrac3_oma.c b/apps/codecs/atrac3_oma.c
index df3499913c..00a0ec001e 100644
--- a/apps/codecs/atrac3_oma.c
+++ b/apps/codecs/atrac3_oma.c
@@ -60,7 +60,7 @@ next_track:
60 60
61 res =atrac3_decode_init(&q, ci->id3); 61 res =atrac3_decode_init(&q, ci->id3);
62 if(res < 0) { 62 if(res < 0) {
63 DEBUGF("failed to initialize atrac decoder\n"); 63 DEBUGF("failed to initialize OMA atrac decoder\n");
64 return CODEC_ERROR; 64 return CODEC_ERROR;
65 } 65 }
66 66
diff --git a/apps/codecs/atrac3_rm.c b/apps/codecs/atrac3_rm.c
index b8f8489b1a..a0b0fd8b4b 100644
--- a/apps/codecs/atrac3_rm.c
+++ b/apps/codecs/atrac3_rm.c
@@ -83,7 +83,7 @@ next_track:
83 83
84 res =atrac3_decode_init(&q, ci->id3); 84 res =atrac3_decode_init(&q, ci->id3);
85 if(res < 0) { 85 if(res < 0) {
86 DEBUGF("failed to initialize atrac decoder\n"); 86 DEBUGF("failed to initialize RM atrac decoder\n");
87 return CODEC_ERROR; 87 return CODEC_ERROR;
88 } 88 }
89 89
diff --git a/apps/metadata/wave.c b/apps/metadata/wave.c
index 1753b64330..3a54d72439 100644
--- a/apps/metadata/wave.c
+++ b/apps/metadata/wave.c
@@ -196,6 +196,8 @@ static void parse_riff_format(unsigned char* buf, int fmtsize, struct wave_fmt *
196 id3->extradata_size = 14; 196 id3->extradata_size = 14;
197 id3->channels = 2; 197 id3->channels = 2;
198 id3->codectype = AFMT_OMA_ATRAC3; 198 id3->codectype = AFMT_OMA_ATRAC3;
199 id3->bytesperframe = fmt->blockalign;
200
199 /* Store the extradata for the codec */ 201 /* Store the extradata for the codec */
200 AV_WL16(&id3->id3v2buf[0], 1); // always 1 202 AV_WL16(&id3->id3v2buf[0], 1); // always 1
201 AV_WL32(&id3->id3v2buf[2], id3->frequency);// samples rate 203 AV_WL32(&id3->id3v2buf[2], id3->frequency);// samples rate
@@ -303,7 +305,7 @@ static bool read_header(int fd, struct mp3entry* id3, const unsigned char **chun
303 id3->filesize = filesize(fd); 305 id3->filesize = filesize(fd);
304 306
305 /* Calculate track length (in ms) and estimate the bitrate (in kbit/s) */ 307 /* Calculate track length (in ms) and estimate the bitrate (in kbit/s) */
306 if(fmt.formattag != AFMT_OMA_ATRAC3) 308 if(fmt.formattag != WAVE_FORMAT_ATRAC3)
307 { 309 {
308 if (id3->frequency != 0) 310 if (id3->frequency != 0)
309 id3->length = ((int64_t) fmt.totalsamples * 1000) / id3->frequency; 311 id3->length = ((int64_t) fmt.totalsamples * 1000) / id3->frequency;