mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-09 21:25:19 -05:00
Wrote apps/codecs/wmapro.c and modified libwmapro to make the codec work in the sim. Neither libwmapro nor wmapro.c have been added to the main build yet, codecs.make should be edited to compile both with rockbox.
current status of the decoder : - Plays and seeks in the sim - Still in floating point git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27006 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
9297a02d49
commit
816fca820c
16 changed files with 246 additions and 42 deletions
|
|
@ -274,9 +274,14 @@ static int asf_parse_header(int fd, struct mp3entry* id3,
|
|||
}
|
||||
|
||||
fileprop = 1;
|
||||
/* All we want is the play duration - uint64_t at offset 40 */
|
||||
lseek(fd, 40, SEEK_CUR);
|
||||
|
||||
|
||||
/* Get the number of logical packets - uint16_t at offset 31
|
||||
* (Big endian byte order) */
|
||||
lseek(fd, 31, SEEK_CUR);
|
||||
read_uint16be(fd, &wfx->numpackets);
|
||||
|
||||
/* Now get the play duration - uint64_t at offset 40 */
|
||||
lseek(fd, 7, SEEK_CUR);
|
||||
read_uint64le(fd, &play_duration);
|
||||
id3->length = play_duration / 10000;
|
||||
|
||||
|
|
@ -346,8 +351,9 @@ static int asf_parse_header(int fd, struct mp3entry* id3,
|
|||
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);
|
||||
/* wma pro decoder needs the extra-data */
|
||||
read(fd, wfx->data, wfx->datalen);
|
||||
lseek(fd,current.size - 24 - 72 - wfx->datalen,SEEK_CUR);
|
||||
wfx->audiostream = flags&0x7f;
|
||||
/* Correct codectype to redirect playback to the proper .codec */
|
||||
id3->codectype = AFMT_WMAPRO;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue