From b8cccb5ae18f35ea7d210c513bafe10b19fafbd7 Mon Sep 17 00:00:00 2001 From: Mohamed Tarek Date: Sat, 25 Jul 2009 15:47:13 +0000 Subject: 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 --- apps/metadata/rm.c | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) (limited to 'apps/metadata') 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) rmctx->codec_type = cook; break; + case FOURCC('r','a','a','c'): + case FOURCC('r','a','c','p'): + rmctx->codec_type = aac; + break; + default: /* Not a supported codec */ return -1; } @@ -183,7 +188,10 @@ static inline int real_read_audio_stream_info(int fd, RMContext *rmctx) DEBUGF(" fourcc = %s\n",fourcc2str(fourcc)); DEBUGF(" codec_extra_data_length = %ld\n",rmctx->extradata_size); DEBUGF(" codec_extradata :\n"); - print_cook_extradata(rmctx); + if(rmctx->codec_type == cook) { + DEBUGF(" cook_extradata :\n"); + print_cook_extradata(rmctx); + } } @@ -391,12 +399,11 @@ bool get_rm_metadata(int fd, struct mp3entry* id3) id3->artist = id3->id3v1buf[1]; id3->comment = id3->id3v1buf[3]; - /*switch(rmctx->codec_type) + switch(rmctx->codec_type) { - case cook: - id3->codectype = AFMT_COOK; - break; - }*/ + case aac: + id3->codectype = AFMT_RAAC; + } id3->bitrate = rmctx->bit_rate / 1000; id3->frequency = rmctx->sample_rate; -- cgit v1.2.3