I am developing a Qt application that needs to read from the CD drive, specifically audio CDs. I have included libkcompactdisc and have created a KCompactDisc object. It sees the drive and identifies the drive name, manufacturer, etc. but cannot see the disc in the drive. The OS knows there is a disc in the drive. Every other application on the system sees the CD. But the KCompactDisc object tells me there is no disc. In the rather sparse documentation for this library, I noticed there were functions for Disc Title, Disc Length, and others, as well as commands for play, stop, etc. But there does not seem to be a read or load command. SO HOW DO I GET THE OBJECT TO READ THE FREAKING DISC??? Sorry for shouting but I am going crazy here. Here is the code snippet I am using.
Code:
Disc = new KCompactDisc(KCompactDisc::Synchronous); Disc->setAutoMetadataLookup(true); x = Disc->setDevice(Disc->defaultCdromDeviceName(),50,true,Disc->audioSystems().at(0)); QObject::connect(Disc,SIGNAL(discInformation(KCompactDisc::DiscInfo)),this,SLOT(DisplayDiscInfo(KCompactDisc::DiscInfo))); ui->txtCDInfo->setText(Disc->defaultCdromDeviceName() + "\n" + Disc->discArtist() + "\n" + Disc->discTitle() + "\n" +
The text box shows the name of the drive, blank lines for the artist and title, and zeroes for Disc ID and Length. When I set a breakpoint at the last line and look at the object, the Disc Status is no disc. Any insight you guys can provide would be appreciated. Thanks.