nathan@0
|
1 |
--- discid.c.orig 2001-12-27 19:48:57.000000000 +0100
|
nathan@0
|
2 |
+++ discid.c 2004-02-23 20:18:45.000000000 +0100
|
nathan@0
|
3 |
@@ -5,14 +5,18 @@
|
nathan@0
|
4 |
|
nathan@0
|
5 |
|
nathan@0
|
6 |
unsigned long discid(cd * this_cd) {
|
nathan@0
|
7 |
- unsigned int i=0, t, n = 0;
|
nathan@0
|
8 |
+ unsigned int i=0, t, n = 0, trks=0, l=0;
|
nathan@0
|
9 |
|
nathan@0
|
10 |
for (i=0; i< this_cd->tracks; i++)
|
nathan@0
|
11 |
- n += cddb_sum((this_cd->track[T2I(i)].start_lba+CD_MSF_OFFSET)/CD_FRAMES);
|
nathan@0
|
12 |
+ if(this_cd->track[T2I(i)].type==AUDIO) {
|
nathan@0
|
13 |
+ n += cddb_sum((this_cd->track[T2I(i)].start_lba+CD_MSF_OFFSET)/CD_FRAMES);
|
nathan@0
|
14 |
+ trks++; l=i;
|
nathan@0
|
15 |
+ }
|
nathan@0
|
16 |
|
nathan@0
|
17 |
- t = this_cd->track[T2I(this_cd->tracks-1)].stop_lba/CD_FRAMES;
|
nathan@0
|
18 |
+ t = (this_cd->track[T2I(l+1)].start_lba-
|
nathan@0
|
19 |
+ this_cd->track[T2I(0)].start_lba)/CD_FRAMES;
|
nathan@0
|
20 |
|
nathan@0
|
21 |
- return (((n % 0xFF) << 24) | (t << 8) | this_cd->tracks);
|
nathan@0
|
22 |
+ return (((n % 0xFF) << 24) | (t << 8) | trks);
|
nathan@0
|
23 |
}
|
nathan@0
|
24 |
|
nathan@0
|
25 |
|
nathan@0
|
26 |
--- root.c.orig 2002-04-07 18:31:39.000000000 +0200
|
nathan@0
|
27 |
+++ root.c 2005-02-05 17:27:48.000000000 +0100
|
nathan@0
|
28 |
@@ -146,6 +146,10 @@
|
nathan@0
|
29 |
this_cd->track[i].type = AUDIO;
|
nathan@0
|
30 |
this_cd->track[i].time = CURRENT_TIME;
|
nathan@0
|
31 |
this_cd->track[i].iso_size = 0;
|
nathan@0
|
32 |
+ if ((t!=(this_cd->tracks - 1)) && t > 0 && (this_cd->track[i + 1].type!=AUDIO)) {
|
nathan@0
|
33 |
+ this_cd->track[i].track_size = this_cd->track[i].track_size - 11400;
|
nathan@0
|
34 |
+ this_cd->track[i].stop_lba = this_cd->track[i].stop_lba -11400;
|
nathan@0
|
35 |
+ }
|
nathan@0
|
36 |
this_cd->track[i].track_size = this_cd->track[i].track_size * CD_FRAMESIZE_RAW + ((this_cd->raw_audio==0)?WAV_HEADER_SIZE:0);
|
nathan@0
|
37 |
this_cd->track[i].size = this_cd->track[i].track_size;
|
nathan@0
|
38 |
this_cd->track[i].avi = 0;
|