summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Nielsen Feltzing <linus@haxx.se>2002-07-05 07:13:43 +0000
committerLinus Nielsen Feltzing <linus@haxx.se>2002-07-05 07:13:43 +0000
commitc644fc29563c3e970274471142773f403c608057 (patch)
tree06b2169812a94ba72744ec80fb4df05be3d0a5f3
parentb62b0b6699cfe96d1c21e01c23e71d3095d1bd46 (diff)
downloadrockbox-c644fc29563c3e970274471142773f403c608057.zip
rockbox-c644fc29563c3e970274471142773f403c608057.tar.gz
rockbox-c644fc29563c3e970274471142773f403c608057.tar.bz2
rockbox-c644fc29563c3e970274471142773f403c608057.tar.xz
Added a vbr flag in the id3 struct
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@1339 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--firmware/id3.c4
-rw-r--r--firmware/id3.h3
2 files changed, 4 insertions, 3 deletions
diff --git a/firmware/id3.c b/firmware/id3.c
index b101aee..b363adc 100644
--- a/firmware/id3.c
+++ b/firmware/id3.c
@@ -490,13 +490,15 @@ static int getsonglength(int fd, struct mp3entry *entry)
frame[34] == 'n' &&
frame[35] == 'g')
{
+ /* Yes, it is a VBR file */
+ entry->vbr = true;
+
if(frame[39] & 0x01) /* Is the frame count there? */
{
framecount = (frame[40] << 24) | (frame[41] << 16) |
(frame[42] << 8) | frame[43];
filetime = framecount * tpf;
- entry->bitrate = VARIABLE_BIT_RATE;
}
/* We don't care about the file size and the TOC just yet. Maybe
another time. */
diff --git a/firmware/id3.h b/firmware/id3.h
index 60f6605..9c8b566 100644
--- a/firmware/id3.h
+++ b/firmware/id3.h
@@ -19,8 +19,6 @@
#ifndef ID3_H
#define ID3_H
-#define VARIABLE_BIT_RATE 1
-
struct mp3entry {
char path[256];
char *title;
@@ -29,6 +27,7 @@ struct mp3entry {
int tracknum;
int version;
int layer;
+ bool vbr;
unsigned int bitrate;
unsigned int frequency;
unsigned int id3v2len;