We’re doing the beta for our application (which is going really well on both Mac and PC, and I have to thanks Juce for at least part of that…)
I went to some effort to make sure that I was able to recognize two CD readers, because some people have 'em (and I wanted to make sure that it at least didn’t do something bad). And that works.
BUT I have two reports of a phantom extra CD appearing on user’s machines! I got more information from one case, and it seems it’s coming from a “BD-ROM” which seems to be on their system - which seems to be a Blu-Ray CD-ROM.
What’s interesting is in both cases, FreeDB positively identifies the “CD” in the drive as being a German CD! I got a screen shot from one, identifying it as “Die Botschaft Meines Körpers/Dr. Diethard Stelz”.
I do quite a bit of error checking in my code to eliminate spurious CDs so I’m a little baffled as to how that could happen.
Here’s the actual code I’m using: StringArray names = AudioCDReader::getAvailableCDNames();
for (int i = 0; i < names.size(); ++i) {
ptr<AudioCDReader> reader(AudioCDReader::createReaderForCD(i));
if (!reader)
LOG(ERROR) << "Couldn't create reader for " << names[i];
else if (!reader->isCDStillPresent())
continue;
else if (!reader->getNumTracks())
LOG(ERROR) << "No tracks for " << names[i];
else
add(VirtualFile::CD, str(cd::getCDKey(reader.get())), volumes); // It's a CD.
}
More than this, I’m actually going further and getting the track lengths to send to freeDB - or else they wouldn’t be seeing anything there - so this “BD-ROM” really has to look a lot like a CD.
Any thoughts welcome. It’s likely I’m going to find that CD key and then simply block those CDs from appearing but that’s pretty mysterious…