Help - Search - Members - Calendar
Full Version: TOC/CUE -> freedb/cddb?
Hydrogenaudio Forums > CD-R and Audio Hardware > CD Hardware/Software
bhoar
I suspect there isn't, but I'll ask anyway: is there enough information in a typical .TOC or .CUE file (stripped of custom entries) to build a reliable freedb submission?

-brendan
greynol
The total length (in seconds) of the CD is required but is not included in CUE files.

The extended pregap before the first track must also be included if it is not zero and depending on what is used to create the CUE (eg. EAC prior to V0.95b1) it might not be present.
bhoar
Hmm, will a TOC file include either of those typically or inherently?

I just noticed that the cdrdao package includes toc2cddb and cue2toc...but I suspect the absence of a cue2cddb belies the fact that a cue file may be less complete than a toc file.

-brendan
greynol
I don't know what all is included in the TOC, which is why I only commented on the CUE files.

From what I understand, a submission requires a disc ID and genre besides the artist/album/track information. The disc ID is calculated from the start point of each track and the total length of the disc.
bhoar
QUOTE(greynol @ Nov 29 2006, 02:52) *

I don't know what all is included in the TOC, which is why I only commented on the CUE files.

From what I understand, a submission requires a disc ID and genre besides the artist/album/track information. The disc ID is calculated from the start point of each track and the total length of the disc.


I answered the question experimentally.

I used cdrdao to extract a toc file from a cd. Then I fed the toc file (sans CD or WAV file) to toc2cddb and it generated the disc ID and performed the lookup, found a match and returned the data.

So, a TOC file appears to contain everything necessary to perform a freedb lookup. I suppose that's not *too* surprising, as a TOC file is meant to represent the actual TOC on a CD and the information in the latter is used to generate the discid for lookups.

The reason I asked: I'm using the uFreeDB ocx control in my own app and was curious about whether I should also generate a TOC file in case I wanted to re-do the freedb lookup (or deal with multiple-matches) later in the workflow. Since you indicated the CUE file doesn't include enough information, and experimentation shows that the TOC file does, I think I'll use an external cdrdao call to create a TOC file as well.

Now, I just have to figure out how to map the drive letter to the (psuedo) scsi controller number/device number programmatically...

-brendan
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.