Logo Search packages:      
Sourcecode: k9copy version File versions  Download package

K3bDevice::CdText K3bDevice::Device::readCdText (  )  const

Read the CD-TEXT of an audio or mixed-mode CD.

Returns:
A CdText object filled with the CD-TEXT values or an empty one in case of pure data media or if the CD does not contain CD-TEXT.

Definition at line 1295 of file k3bdevice.cpp.

References close(), isOpen(), open(), and readTocPmaAtip().

{
  // if the device is already opened we do not close it
  // to allow fast multible method calls in a row
  bool needToClose = !isOpen();

  K3bDevice::CdText textData;

  if( open() ) {
    unsigned char* data = 0;
    int dataLen = 0;

    if( readTocPmaAtip( &data, dataLen, 5, false, 0 ) ) {
      textData.setRawPackData( data, dataLen );

      delete [] data;
    }

    if( needToClose )
      close();
  }

  return textData;
}


Generated by  Doxygen 1.6.0   Back to index