summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMohamed Tarek <mt@rockbox.org>2010-05-09 21:42:09 +0000
committerMohamed Tarek <mt@rockbox.org>2010-05-09 21:42:09 +0000
commitcd4d80aeba3c65cb30b520f1aad1e6008e9535b5 (patch)
tree94e437c5c75df6ed2b36cfc3ddaa9d9aa635c9a8
parent6a96037d09c99041bae87ae7c7a5189adafd7408 (diff)
nomsg
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25922 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/codecs/SOURCES1
-rw-r--r--apps/codecs/codecs.make1
-rw-r--r--apps/codecs/libasf/asf.h5
-rw-r--r--apps/codecs/wmapro.c33
-rw-r--r--apps/metadata.c3
-rw-r--r--apps/metadata.h1
-rw-r--r--apps/metadata/asf.c8
7 files changed, 49 insertions, 3 deletions
diff --git a/apps/codecs/SOURCES b/apps/codecs/SOURCES
index 8970567b65..e2ee53e7ee 100644
--- a/apps/codecs/SOURCES
+++ b/apps/codecs/SOURCES
@@ -16,6 +16,7 @@ atrac3_rm.c
atrac3_oma.c
mpc.c
wma.c
+wmapro.c
sid.c
ape.c
nsf.c
diff --git a/apps/codecs/codecs.make b/apps/codecs/codecs.make
index fa5eae67c5..7a83e5d1da 100644
--- a/apps/codecs/codecs.make
+++ b/apps/codecs/codecs.make
@@ -82,6 +82,7 @@ $(CODECDIR)/shorten.codec : $(CODECDIR)/libffmpegFLAC.a
$(CODECDIR)/ape-pre.map : $(CODECDIR)/libdemac-pre.a
$(CODECDIR)/ape.codec : $(CODECDIR)/libdemac.a
$(CODECDIR)/wma.codec : $(CODECDIR)/libwma.a $(CODECDIR)/libasf.a
+$(CODECDIR)/wmapro.codec : $(CODECDIR)/libwma.a $(CODECDIR)/libasf.a
$(CODECDIR)/wavpack_enc.codec: $(CODECDIR)/libwavpack.a
$(CODECDIR)/asap.codec : $(CODECDIR)/libasap.a
$(CODECDIR)/cook.codec : $(CODECDIR)/libcook.a $(CODECDIR)/librm.a
diff --git a/apps/codecs/libasf/asf.h b/apps/codecs/libasf/asf.h
index 09767650a3..c15bf4edec 100644
--- a/apps/codecs/libasf/asf.h
+++ b/apps/codecs/libasf/asf.h
@@ -4,8 +4,9 @@
#include <inttypes.h>
/* ASF codec IDs */
-#define ASF_CODEC_ID_WMAV1 0x160
-#define ASF_CODEC_ID_WMAV2 0x161
+#define ASF_CODEC_ID_WMAV1 0x160
+#define ASF_CODEC_ID_WMAV2 0x161
+#define ASF_CODEC_ID_WMAPRO 0x162
enum asf_error_e {
ASF_ERROR_INTERNAL = -1, /* incorrect input to API calls */
diff --git a/apps/codecs/wmapro.c b/apps/codecs/wmapro.c
new file mode 100644
index 0000000000..e15a610679
--- /dev/null
+++ b/apps/codecs/wmapro.c
@@ -0,0 +1,33 @@
+/***************************************************************************
+ * __________ __ ___.
+ * Open \______ \ ____ ____ | | _\_ |__ _______ ___
+ * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
+ * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
+ * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
+ * \/ \/ \/ \/ \/
+ * $Id$
+ *
+ * Copyright (C) 2010 Mohamed Tarek
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ ****************************************************************************/
+
+#include "codeclib.h"
+
+CODEC_HEADER
+
+/* this is the codec entry point */
+enum codec_status codec_main(void)
+{
+ DEBUGF("WMA: WMA Professional has not been implemented yet\n");
+
+ return CODEC_ERROR;
+}
+
diff --git a/apps/metadata.c b/apps/metadata.c
index 2a49392193..97f376035d 100644
--- a/apps/metadata.c
+++ b/apps/metadata.c
@@ -107,6 +107,9 @@ const struct afmt_entry audio_formats[AFMT_NUM_CODECS] =
/* WMA (WMAV1/V2 in ASF) */
[AFMT_WMA] =
AFMT_ENTRY("WMA", "wma", NULL, "wma\0wmv\0asf\0" ),
+ /* WMA Professional in ASF */
+ [AFMT_WMAPRO] =
+ AFMT_ENTRY("WMAPro", "wmapro", NULL, "wma\0wmv\0asf\0" ),
/* Amiga MOD File */
[AFMT_MOD] =
AFMT_ENTRY("MOD", "mod", NULL, "mod\0" ),
diff --git a/apps/metadata.h b/apps/metadata.h
index 0d0f6c5aac..aa59eac2dd 100644
--- a/apps/metadata.h
+++ b/apps/metadata.h
@@ -59,6 +59,7 @@ enum
AFMT_SPC, /* SPC700 save state */
AFMT_APE, /* Monkey's Audio (APE) */
AFMT_WMA, /* WMAV1/V2 in ASF */
+ AFMT_WMAPRO, /* WMA Professional in ASF */
AFMT_MOD, /* Amiga MOD File Format */
AFMT_SAP, /* Atari 8Bit SAP Format */
AFMT_RM_COOK, /* Cook in RM/RA */
diff --git a/apps/metadata/asf.c b/apps/metadata/asf.c
index fac4092256..db806ea17f 100644
--- a/apps/metadata/asf.c
+++ b/apps/metadata/asf.c
@@ -345,8 +345,14 @@ static int asf_parse_header(int fd, struct mp3entry* id3,
read(fd, wfx->data, 6);
lseek(fd,current.size - 24 - 72 - 6,SEEK_CUR);
wfx->audiostream = flags&0x7f;
+ } else if (wfx->codec_id == ASF_CODEC_ID_WMAPRO) {
+ read(fd, wfx->data, 10);
+ lseek(fd,current.size - 24 - 72 - 10,SEEK_CUR);
+ wfx->audiostream = flags&0x7f;
+ /* Correct codectype to redirect playback to the proper .codec */
+ id3->codectype = AFMT_WMAPRO;
} else {
- DEBUGF("Unsupported WMA codec (Pro, Lossless, Voice, etc)\n");
+ DEBUGF("Unsupported WMA codec (Lossless, Voice, etc)\n");
lseek(fd,current.size - 24 - 72,SEEK_CUR);
}