diff options
author | Linus Nielsen Feltzing <linus@haxx.se> | 2002-07-05 07:13:43 +0000 |
---|---|---|
committer | Linus Nielsen Feltzing <linus@haxx.se> | 2002-07-05 07:13:43 +0000 |
commit | c644fc29563c3e970274471142773f403c608057 (patch) | |
tree | 06b2169812a94ba72744ec80fb4df05be3d0a5f3 /firmware | |
parent | b62b0b6699cfe96d1c21e01c23e71d3095d1bd46 (diff) | |
download | rockbox-c644fc29563c3e970274471142773f403c608057.tar.gz rockbox-c644fc29563c3e970274471142773f403c608057.zip |
Added a vbr flag in the id3 struct
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@1339 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware')
-rw-r--r-- | firmware/id3.c | 4 | ||||
-rw-r--r-- | firmware/id3.h | 3 |
2 files changed, 4 insertions, 3 deletions
diff --git a/firmware/id3.c b/firmware/id3.c index b101aee407..b363adc0dd 100644 --- a/firmware/id3.c +++ b/firmware/id3.c | |||
@@ -490,13 +490,15 @@ static int getsonglength(int fd, struct mp3entry *entry) | |||
490 | frame[34] == 'n' && | 490 | frame[34] == 'n' && |
491 | frame[35] == 'g') | 491 | frame[35] == 'g') |
492 | { | 492 | { |
493 | /* Yes, it is a VBR file */ | ||
494 | entry->vbr = true; | ||
495 | |||
493 | if(frame[39] & 0x01) /* Is the frame count there? */ | 496 | if(frame[39] & 0x01) /* Is the frame count there? */ |
494 | { | 497 | { |
495 | framecount = (frame[40] << 24) | (frame[41] << 16) | | 498 | framecount = (frame[40] << 24) | (frame[41] << 16) | |
496 | (frame[42] << 8) | frame[43]; | 499 | (frame[42] << 8) | frame[43]; |
497 | 500 | ||
498 | filetime = framecount * tpf; | 501 | filetime = framecount * tpf; |
499 | entry->bitrate = VARIABLE_BIT_RATE; | ||
500 | } | 502 | } |
501 | /* We don't care about the file size and the TOC just yet. Maybe | 503 | /* We don't care about the file size and the TOC just yet. Maybe |
502 | another time. */ | 504 | another time. */ |
diff --git a/firmware/id3.h b/firmware/id3.h index 60f660588f..9c8b5663a9 100644 --- a/firmware/id3.h +++ b/firmware/id3.h | |||
@@ -19,8 +19,6 @@ | |||
19 | #ifndef ID3_H | 19 | #ifndef ID3_H |
20 | #define ID3_H | 20 | #define ID3_H |
21 | 21 | ||
22 | #define VARIABLE_BIT_RATE 1 | ||
23 | |||
24 | struct mp3entry { | 22 | struct mp3entry { |
25 | char path[256]; | 23 | char path[256]; |
26 | char *title; | 24 | char *title; |
@@ -29,6 +27,7 @@ struct mp3entry { | |||
29 | int tracknum; | 27 | int tracknum; |
30 | int version; | 28 | int version; |
31 | int layer; | 29 | int layer; |
30 | bool vbr; | ||
32 | unsigned int bitrate; | 31 | unsigned int bitrate; |
33 | unsigned int frequency; | 32 | unsigned int frequency; |
34 | unsigned int id3v2len; | 33 | unsigned int id3v2len; |