diff options
author | Mohamed Tarek <mt@rockbox.org> | 2009-07-25 15:47:13 +0000 |
---|---|---|
committer | Mohamed Tarek <mt@rockbox.org> | 2009-07-25 15:47:13 +0000 |
commit | b8cccb5ae18f35ea7d210c513bafe10b19fafbd7 (patch) | |
tree | 901a2d75ad40134a005c3bbb68949f551fc9c50e /apps/metadata | |
parent | 8f572ca525bf3812799e627a4a716300e412c244 (diff) | |
download | rockbox-b8cccb5ae18f35ea7d210c513bafe10b19fafbd7.tar.gz rockbox-b8cccb5ae18f35ea7d210c513bafe10b19fafbd7.zip |
Adding support for playback of aac audio in rm container, with seeking.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22031 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/metadata')
-rw-r--r-- | apps/metadata/rm.c | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/apps/metadata/rm.c b/apps/metadata/rm.c index bfaa803be7..95889c35c3 100644 --- a/apps/metadata/rm.c +++ b/apps/metadata/rm.c | |||
@@ -169,6 +169,11 @@ static inline int real_read_audio_stream_info(int fd, RMContext *rmctx) | |||
169 | rmctx->codec_type = cook; | 169 | rmctx->codec_type = cook; |
170 | break; | 170 | break; |
171 | 171 | ||
172 | case FOURCC('r','a','a','c'): | ||
173 | case FOURCC('r','a','c','p'): | ||
174 | rmctx->codec_type = aac; | ||
175 | break; | ||
176 | |||
172 | default: /* Not a supported codec */ | 177 | default: /* Not a supported codec */ |
173 | return -1; | 178 | return -1; |
174 | } | 179 | } |
@@ -183,7 +188,10 @@ static inline int real_read_audio_stream_info(int fd, RMContext *rmctx) | |||
183 | DEBUGF(" fourcc = %s\n",fourcc2str(fourcc)); | 188 | DEBUGF(" fourcc = %s\n",fourcc2str(fourcc)); |
184 | DEBUGF(" codec_extra_data_length = %ld\n",rmctx->extradata_size); | 189 | DEBUGF(" codec_extra_data_length = %ld\n",rmctx->extradata_size); |
185 | DEBUGF(" codec_extradata :\n"); | 190 | DEBUGF(" codec_extradata :\n"); |
186 | print_cook_extradata(rmctx); | 191 | if(rmctx->codec_type == cook) { |
192 | DEBUGF(" cook_extradata :\n"); | ||
193 | print_cook_extradata(rmctx); | ||
194 | } | ||
187 | 195 | ||
188 | } | 196 | } |
189 | 197 | ||
@@ -391,12 +399,11 @@ bool get_rm_metadata(int fd, struct mp3entry* id3) | |||
391 | id3->artist = id3->id3v1buf[1]; | 399 | id3->artist = id3->id3v1buf[1]; |
392 | id3->comment = id3->id3v1buf[3]; | 400 | id3->comment = id3->id3v1buf[3]; |
393 | 401 | ||
394 | /*switch(rmctx->codec_type) | 402 | switch(rmctx->codec_type) |
395 | { | 403 | { |
396 | case cook: | 404 | case aac: |
397 | id3->codectype = AFMT_COOK; | 405 | id3->codectype = AFMT_RAAC; |
398 | break; | 406 | } |
399 | }*/ | ||
400 | 407 | ||
401 | id3->bitrate = rmctx->bit_rate / 1000; | 408 | id3->bitrate = rmctx->bit_rate / 1000; |
402 | id3->frequency = rmctx->sample_rate; | 409 | id3->frequency = rmctx->sample_rate; |