[Grip-users] RE: Help reading mixed audio and data CD
Brought to you by:
solbu
From: Mike O. - D. T. <Mik...@de...> - 2005-12-21 22:52:18
|
Hi Kris, There is a gap between the last audio track and the data track on data CDs. It has been a while since I wrote the code, but from looking at it, it seems the gap is 152 seconds long. Hence, you need to subtract 152 seconds from the length of the track before the data track. Mike -----Original Message----- From: Kris Warkentin [mailto:KEW...@qn...]=20 Sent: Wednesday, December 21, 2005 2:36 PM To: 'gri...@li...' Cc: 'gr...@no...' Subject: Help reading mixed audio and data CD Hi Grip developers, My name is Kris Warkentin from QNX Software Systems in Canada. Part of my job is actually as a gdb maintainer and we also are the maintainers of the C development toolkit in the Eclipse IDE. As a company, we're trying to give back so I hope you won't mind if I ask you to help enlighten me on a problem I'm having. Given an audio cd with a data track (1-12 audio, 13 data), our driver is reading the TOC and giving back the addresses (lba) of each track. So the method of calculating the length is simply track[n].length =3D track[n+1].lba - track[n].lba. This in general seems fine but in the case of this particular audio cd, the lba of track 13 comes out as quite a bit too high resulting in the calculation of the song length being over 6 minutes instead of 3:45. Windows calculates this correctly as does your software. Interestingly, the Gnome CD player doesn't seem to do it right but you guys have definitely got it. Anyway, sorry to be asking vague and stupid questions but our driver developer insists that he just reads the TOC off of the disk with no modifications and that there are no further inferences to be made about the lengths of the tracks. Even if it isn't something that can be corrected in the driver, I'd love to be able to correctly figure out the length of the last track. cheers, Kris |