mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-11 06:05:21 -05:00
nomsg
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25922 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
6a96037d09
commit
cd4d80aeba
7 changed files with 49 additions and 3 deletions
|
|
@ -16,6 +16,7 @@ atrac3_rm.c
|
|||
atrac3_oma.c
|
||||
mpc.c
|
||||
wma.c
|
||||
wmapro.c
|
||||
sid.c
|
||||
ape.c
|
||||
nsf.c
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@
|
|||
/* ASF codec IDs */
|
||||
#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 */
|
||||
|
|
|
|||
33
apps/codecs/wmapro.c
Normal file
33
apps/codecs/wmapro.c
Normal file
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
@ -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" ),
|
||||
|
|
|
|||
|
|
@ -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 */
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue