summaryrefslogtreecommitdiff
path: root/apps/metadata/hes.c
diff options
context:
space:
mode:
authorSean Bartell <wingedtachikoma@gmail.com>2011-06-24 01:25:21 -0400
committerNils Wallménius <nils@rockbox.org>2012-03-18 12:00:39 +0100
commitb5716df4cb2837bbbc42195cf1aefcf03e21d6a6 (patch)
tree130cd712e2e00893b6df9959a375a8d9523a1aca /apps/metadata/hes.c
parent24bd9d5393dbe39a5c6194877bc00ede669b1d5d (diff)
downloadrockbox-b5716df4cb2837bbbc42195cf1aefcf03e21d6a6.tar.gz
rockbox-b5716df4cb2837bbbc42195cf1aefcf03e21d6a6.zip
Build librbcodec with DSP and metadata.
All associated files are moved to /lib/rbcodec. Change-Id: I572ddd2b8a996aae1e98c081d06b1ed356dce222
Diffstat (limited to 'apps/metadata/hes.c')
-rw-r--r--apps/metadata/hes.c39
1 files changed, 0 insertions, 39 deletions
diff --git a/apps/metadata/hes.c b/apps/metadata/hes.c
deleted file mode 100644
index 6d99d523cb..0000000000
--- a/apps/metadata/hes.c
+++ /dev/null
@@ -1,39 +0,0 @@
1#include <stdio.h>
2#include <string.h>
3#include <stdlib.h>
4#include <ctype.h>
5#include <inttypes.h>
6
7#include "system.h"
8#include "metadata.h"
9#include "metadata_common.h"
10#include "metadata_parsers.h"
11#include "rbunicode.h"
12#include "plugin.h"
13
14bool get_hes_metadata(int fd, struct mp3entry* id3)
15{
16 /* Use the id3v2 buffer part of the id3 structure as a temporary buffer */
17 unsigned char* buf = (unsigned char *)id3->id3v2buf;
18 int read_bytes;
19
20 if ((lseek(fd, 0, SEEK_SET) < 0)
21 || ((read_bytes = read(fd, buf, 4)) < 4))
22 return false;
23
24 /* Verify this is a HES file */
25 if (memcmp(buf,"HESM",4) != 0)
26 return false;
27
28 id3->vbr = false;
29 id3->filesize = filesize(fd);
30 /* we only render 16 bits, 44.1KHz, Stereo */
31 id3->bitrate = 706;
32 id3->frequency = 44100;
33
34 /* Set default track count (length)*/
35 id3->length = 255 * 1000;
36
37 return true;
38}
39