From 66ebc35c557e27401799e542a6fee8c824364bb2 Mon Sep 17 00:00:00 2001 From: Yoshihisa Uchida Date: Tue, 2 Mar 2010 10:59:46 +0000 Subject: Wave/Wave64/vox metadata parser: optimize just a little. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24992 a1c6a512-1295-4272-9138-f99709370657 --- apps/metadata/vox.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'apps/metadata/vox.c') diff --git a/apps/metadata/vox.c b/apps/metadata/vox.c index 2d937e2c73..3f4e5d553c 100644 --- a/apps/metadata/vox.c +++ b/apps/metadata/vox.c @@ -32,12 +32,17 @@ bool get_vox_metadata(int fd, struct mp3entry* id3) { - /* vox is headerless format */ - + /* + * vox is headerless format + * + * frequency: 8000 Hz + * channels: mono + * bitspersample: 4 + */ id3->frequency = 8000; - id3->vbr = false; /* All VOX files are CBR */ - id3->filesize = filesize(fd); - id3->length = ((int64_t) id3->filesize * 2000) / id3->frequency; + id3->vbr = false; /* All VOX files are CBR */ + id3->filesize = filesize(fd); + id3->length = id3->filesize >> 2; return true; } -- cgit v1.2.3