diff options
author | Yoshihisa Uchida <uchida@rockbox.org> | 2010-03-02 10:59:46 +0000 |
---|---|---|
committer | Yoshihisa Uchida <uchida@rockbox.org> | 2010-03-02 10:59:46 +0000 |
commit | 66ebc35c557e27401799e542a6fee8c824364bb2 (patch) | |
tree | f762331466af2999329b73618ce071b8d46279fa /apps/metadata/vox.c | |
parent | 04e0d6c12c6ad878b551be79a7c83c8b1784e748 (diff) | |
download | rockbox-66ebc35c557e27401799e542a6fee8c824364bb2.tar.gz rockbox-66ebc35c557e27401799e542a6fee8c824364bb2.zip |
Wave/Wave64/vox metadata parser: optimize just a little.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24992 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/metadata/vox.c')
-rw-r--r-- | apps/metadata/vox.c | 15 |
1 files changed, 10 insertions, 5 deletions
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 @@ | |||
32 | 32 | ||
33 | bool get_vox_metadata(int fd, struct mp3entry* id3) | 33 | bool get_vox_metadata(int fd, struct mp3entry* id3) |
34 | { | 34 | { |
35 | /* vox is headerless format */ | 35 | /* |
36 | 36 | * vox is headerless format | |
37 | * | ||
38 | * frequency: 8000 Hz | ||
39 | * channels: mono | ||
40 | * bitspersample: 4 | ||
41 | */ | ||
37 | id3->frequency = 8000; | 42 | id3->frequency = 8000; |
38 | id3->vbr = false; /* All VOX files are CBR */ | 43 | id3->vbr = false; /* All VOX files are CBR */ |
39 | id3->filesize = filesize(fd); | 44 | id3->filesize = filesize(fd); |
40 | id3->length = ((int64_t) id3->filesize * 2000) / id3->frequency; | 45 | id3->length = id3->filesize >> 2; |
41 | 46 | ||
42 | return true; | 47 | return true; |
43 | } | 48 | } |