summaryrefslogtreecommitdiff
path: root/apps/metadata/vox.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/metadata/vox.c')
-rw-r--r--apps/metadata/vox.c15
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
33bool get_vox_metadata(int fd, struct mp3entry* id3) 33bool 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}