Hello, Jucey people!
As you might have deduced, I’m trying to get CDDB data through JUCE…
and am now realizing that I don’t have quite enough information to do so in the correct way - and am going to suggest a change to JUCE (that I could write if Jules could put it in).
Here’s the protocol: http://ftp.freedb.org/pub/freedb/latest/CDDBPROTO
Now, the canonical way to get disk information is the “query” command (about a page down on that), which has commands like:
cddb query discid ntrks off1 off2 ... nsecs where discid is the CDDB disk ID, ntracks is the number of tracks, off1…offn are the track offsets in frames and nsecs is the total length of the disk in seconds.
Unfortunately, the AudioCDReader class doesn’t give you all this information - specifically, we’re missing track offsets and the length of the disk.
I’m proposing to add these two accessors to the AudioCDReader class.
I can get these values for the Mac.
Looking at the implementation for the PC, it seems that you only have access to the track offsets in seconds, not frames (one frame is 1/75 of a second)… it’d be nice to get those in frames or I could fake it by multiplying them by 75…
For the moment, I’m going to fake it by using this other command!
cddb read categ discidand simply commit the sin of iterating through all the categories until I find the disk! Fine for development, but I can’t do that for production as I don’t want our clients to hit the FreeDB 11 times for each query…