PrimoBurner(tm) for C++  4.7
CD, DVD and Blu-ray Software Development Kit
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Pages
AudioCD Class Referenceabstract

Burns and rips audio CDs from/to audio files. More...

#include <PrimoBurnerAPI.h>

Inherits Reference.

Public Member Functions

virtual AudioDecodingMethod::Enum audioDecodingMethod () const =0
 Gets the current audio decoding method. More...
 
virtual AudioInputListaudioInputs () const =0
 Gets a list of audio inputs. More...
 
virtual AudioCDCallbackcallback () const =0
 Gets the current callback set in AudioCD. More...
 
virtual CDSessioncdSession () const =0
 Gets the object set via the setCDSession method. More...
 
virtual CDTextcdText () const =0
 Gets the object set via the setCDText method. More...
 
virtual bool_t closeDisc () const =0
 Gets the current setting for closing the disc after the burning is complete. More...
 
virtual CDSessioncreateCDSession ()=0
 Creates a CDSession instance from the audio inputs . More...
 
virtual Devicedevice () const =0
 Gets the Device object which should be used for burning. More...
 
virtual const ErrorInfoerror () const =0
 Gets error information about the last operation. More...
 
virtual AudioInputerrorInput ()=0
 Gets the audio input that caused an error. More...
 
virtual int32_t inputLength (AudioInput *audioInput)=0
 Returns the estimated size of the AudioInput in CDDA blocks (frames). More...
 
virtual bool_t readBlocksFromCD (int32_t startLba, int32_t blocks, AudioOutput *output)=0
 Reads the specified audio region into a file/stream. More...
 
virtual bool_t readTrackFromCD (int32_t trackNumber, AudioOutput *output)=0
 Reads the specified audio track into a file/stream. More...
 
virtual int sessionLength ()=0
 Gets the session length. More...
 
virtual void setAudioDecodingMethod (AudioDecodingMethod::Enum decodingMethod)=0
 Sets the audio decoding method that should be used in writeToCD method. More...
 
virtual void setCallback (AudioCDCallback *callback)=0
 Sets a callback object for burning progress and file status reporting. More...
 
virtual void setCDSession (CDSession *session)=0
 Sets CDSession object to be used by the writeToCD method. More...
 
virtual void setCDText (CDText *cdText)=0
 Sets the CD-TEXT data that should be written to the CD. More...
 
virtual void setCloseDisc (bool_t close)=0
 Indicates that the disc should be closed after the burning. More...
 
virtual void setDevice (Device *device)=0
 Sets a Device object which should be used for burning. More...
 
virtual void setSimulateBurn (bool_t simulate)=0
 Indicates that simulation should be performed instead of real recording. More...
 
virtual bool_t setWriteMethod (WriteMethod::Enum writeMethod)=0
 Sets the write method that should be used for burning next CD session. More...
 
virtual bool_t simulateBurn () const =0
 Gets the current simulation setting. More...
 
virtual WriteMethod::Enum writeMethod () const =0
 Gets the value set via setWriteMethod. More...
 
virtual bool_t writeToCD ()=0
 The writeToCD method writes an audio session to a CD. More...
 
- Public Member Functions inherited from Reference
virtual int32_t release () const =0
 Releases the instance. More...
 
virtual int32_t retain () const =0
 Retains the instance. More...
 
virtual int32_t retainCount () const =0
 Returns the current reference count. More...
 

Detailed Description

Burns and rips audio CDs from/to audio files.

Member Function Documentation

virtual AudioDecodingMethod::Enum audioDecodingMethod ( ) const
pure virtual

Gets the current audio decoding method.

Returns
A constant from the AudioDecodingMethod enumeration.
virtual AudioInputList* audioInputs ( ) const
pure virtual

Gets a list of audio inputs.

The order of the inputs in the list determines the sequence of the audio content written to the audio CD.

Returns
A pointer to AudioinputList object.
See Also
AudioInputList
AudioInput
Library::createAudioInput
virtual AudioCDCallback* callback ( ) const
pure virtual

Gets the current callback set in AudioCD.

Returns
The callback previously set by setCallback or NULL if no callback is set.
virtual CDSession* cdSession ( ) const
pure virtual

Gets the object set via the setCDSession method.

Returns
A pointer to a CDSession object.
virtual CDText* cdText ( ) const
pure virtual

Gets the object set via the setCDText method.

Returns
Pointer to a CDText object or NULL if no CD-Text is set.
virtual bool_t closeDisc ( ) const
pure virtual

Gets the current setting for closing the disc after the burning is complete.

Returns
TRUE if the disc will be closed after the burning is complete.
virtual CDSession* createCDSession ( )
pure virtual

Creates a CDSession instance from the audio inputs .

NOTES: The returned CDSession object may be additionally manipulated and indexes can be added to the existing tracks. If you change it you need to set it explicitly via SetCDSesion before calling the WriteToCD method.

AudioCD will validate and use the CDSession object set via the setCDSession method only if the write method is WriteMethod::Sao (Session-At-Once).

There is no need to create, modify and set an CDSession object if the write method is WriteMethod::Tao (Track-At-Once), because AudioCD will ignore it.

The calling application is responsible for releasing the CDSession object.

Returns
A pointer to the created CDSession object or NULL if a CDSession could not be created. In this case the last error code is AudioCDError::InputError .
See Also
AudioInputList
error
writeToCD
setCDSession
WriteMethod::Enum
virtual Device* device ( ) const
pure virtual

Gets the Device object which should be used for burning.

Returns
Pointer to a Device object or NULL if no device is set.
virtual const ErrorInfo* error ( ) const
pure virtual

Gets error information about the last operation.

Returns
A pointer to an ErrorInfo object.
virtual AudioInput* errorInput ( )
pure virtual

Gets the audio input that caused an error.

Call this method when GetLastError returns AUDIOCD_INPUT_ERROR.

Returns
A pointer to an AudioInput object.
NULL when none of the audio inputs have caused error.
See Also
error()
AudioCDError::Enum
virtual int32_t inputLength ( AudioInput audioInput)
pure virtual

Returns the estimated size of the AudioInput in CDDA blocks (frames).

Parameters
audioInputThe audio input for which size should be calculated.
Returns
The size of the audio input in blocks (frames). The size of an audio block (frame) is BlockSize::CDDA bytes.
virtual bool_t readBlocksFromCD ( int32_t  startLba,
int32_t  blocks,
AudioOutput output 
)
pure virtual

Reads the specified audio region into a file/stream.

The output audio format is determined by the audio file extension and the audio plugins mapping.

Parameters
startLba[in] specifies the Logical block address where the reading begins. The first readable LBA is 0.
blocks[in] specifies how many blocks to read.
output[in] specifies the output audio format and where the audio shall be written. The output audio format is determined by the file/stream extension and the audio plugins mapping. The ripped and encoded audio is written to the specified output (file or stream). The output may be NULL in which case the audio is read from the CD but is thrown away.
Returns
1 Success
0 Failure
virtual bool_t readTrackFromCD ( int32_t  trackNumber,
AudioOutput output 
)
pure virtual

Reads the specified audio track into a file/stream.

The output audio format is determined by the audio file extension and the audio plugins mapping.

Parameters
trackNumber[in] specifies which track shall be ripped. Tracks are numbered from 1 to 99. Audio CD standard allows up to 99 tracks.
output[in] specifies the output audio format and where the audio shall be written. The output audio format is determined by the file/stream extension and the audio plugins mapping. The ripped and encoded audio is written to the specified output (file or stream). The output may be NULL in which case the audio is read from the CD but is thrown away.
Returns
1 Success
0 Failure
virtual int sessionLength ( )
pure virtual

Gets the session length.

Returns
Session length in CDDA blocks (frames)
-1 if there was an error.
virtual void setAudioDecodingMethod ( AudioDecodingMethod::Enum  decodingMethod)
pure virtual

Sets the audio decoding method that should be used in writeToCD method.

Input files must be converted to CD Audio format before they are written to the CD.

Parameters
decodingMethodSpecifies whether to use either memory or temp files when decoding/converting the audio inputs.
See Also
AudioDecodingMethod::Enum
virtual void setCallback ( AudioCDCallback callback)
pure virtual

Sets a callback object for burning progress and file status reporting.

Parameters
callbackA pointer to an object that implements the AudioCDCallback interface.
virtual void setCDSession ( CDSession session)
pure virtual

Sets CDSession object to be used by the writeToCD method.

Parameters
sessionA pointer to CDSession object that explicitly specifies the AudioCD layout.

The provided object is used only when the write mode is WriteMethid::Sao (Session-At-Once). It is ignored when the write mode is WriteMethod::Tao (Track-At-Once).

If not set with this method a CD session will be automatically created from the AudioCD::audioInputs. The session passed to this method may describe a layout that differs from the audio inputs. The number of tracks (CDTrack objects) can differ from the number of audio inputs (AudioInput objects).

See Also
Library::createCDSession
CDSession
virtual void setCDText ( CDText cdText)
pure virtual

Sets the CD-TEXT data that should be written to the CD.

This method must be called before the WriteToCD method.

NOTES: CD-TEXT data is ignored (not written) when the write method is WriteMethod::Tao, WriteMethod::RawDao, WriteMethod::RawDao2352 or WriteMethod::FullRawDao.

Parameters
cdTextPointer to a CDText object. Set this parameter to NULL to disable CD-TEXT.
See Also
CDText
pb_create_cd_text
virtual void setCloseDisc ( bool_t  close)
pure virtual

Indicates that the disc should be closed after the burning.

Parameters
closeIf TRUE the disc is closed and it cannot be recorded anymore.
virtual void setDevice ( Device device)
pure virtual

Sets a Device object which should be used for burning.

Parameters
deviceA pointer to a Device object. The device is retained by AudioCD.
virtual void setSimulateBurn ( bool_t  simulate)
pure virtual

Indicates that simulation should be performed instead of real recording.

Parameters
simulateIf TRUE the device is instructed to write in simulation mode.
virtual bool_t setWriteMethod ( WriteMethod::Enum  writeMethod)
pure virtual

Sets the write method that should be used for burning next CD session.

Parameters
writeMethodCurrently only WriteMethod::Tao and WriteMethod::Sao are supported.
Remarks
The default method used by AudioCD is WriteMethod::Sao.
Returns
TRUE if the write method is successfully set, FALSE otherwise.
See Also
WriteMethod::Enum
virtual bool_t simulateBurn ( ) const
pure virtual

Gets the current simulation setting.

Returns
TRUE if simulation is set, FALSE otherwise.
virtual WriteMethod::Enum writeMethod ( ) const
pure virtual

Gets the value set via setWriteMethod.

Returns
A constant from the WriteMethod enumeration.
virtual bool_t writeToCD ( )
pure virtual

The writeToCD method writes an audio session to a CD.

The progress is reported via the AudioCDCallback interface.

Returns
1 The write operation has been successful.
0 The write operation failed.
See Also
AudioCDCallback