1 --- discid.c.orig Thu Dec 27 19:48:57 2001
2 +++ discid.c Mon Feb 23 20:18:44 2004
6 unsigned long discid(cd * this_cd) {
7 - unsigned int i=0, t, n = 0;
8 + unsigned int i=0, t, n = 0, trks=0, l=0;
10 for (i=0; i< this_cd->tracks; i++)
11 - n += cddb_sum((this_cd->track[T2I(i)].start_lba+CD_MSF_OFFSET)/CD_FRAMES);
12 + if(this_cd->track[T2I(i)].type==AUDIO) {
13 + n += cddb_sum((this_cd->track[T2I(i)].start_lba+CD_MSF_OFFSET)/CD_FRAMES);
17 - t = this_cd->track[T2I(this_cd->tracks-1)].stop_lba/CD_FRAMES;
18 + t = (this_cd->track[T2I(l+1)].start_lba-
19 + this_cd->track[T2I(0)].start_lba)/CD_FRAMES;
21 - return (((n % 0xFF) << 24) | (t << 8) | this_cd->tracks);
22 + return (((n % 0xFF) << 24) | (t << 8) | trks);