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

Defines a CD track. More...

#include <PrimoBurnerAPI.h>

Inherits Reference.

Public Member Functions

virtual int32_t end () const =0
 Gets the track end, in blocks, relative to the session start. More...
 
virtual CDIndexListindexes () const =0
 Gets the list of CD indexes that are defined for the track. More...
 
virtual const char * isrc () const =0
 Gets the International Standard Recording Code (ISRC). More...
 
virtual int32_t length () const =0
 Gets the track length without the pre-gap and the post-gap. More...
 
virtual CDModeListmodes () const =0
 Gets the list of CD modes that are defined for the track. More...
 
virtual int32_t postgapEnd () const =0
 Gets the end of the track post-gap, in blocks, relative to the session start. More...
 
virtual int32_t pregapStart () const =0
 Gets the start of the pre-gap area of a CD track, in blocks, relative to the session start. More...
 
virtual void setEnd (int32_t blocks)=0
 Sets the track end, in blocks, relative to the session start. More...
 
virtual void setIsrc (const char *isrc)=0
 Sets the International Standard Recording Code (ISRC). More...
 
virtual void setPostgapEnd (int32_t blocks)=0
 Sets the end of the track post-gap, in blocks, relative to the session start. More...
 
virtual void setPregapStart (int32_t blocks)=0
 Sets the track pre-gap, in blocks, relative to the session start. More...
 
virtual void setStart (int32_t blocks)=0
 Sets the start of the user area of a CD Track, in blocks, relative to the session start. More...
 
virtual void setType (TrackType::Enum trackType)=0
 Sets the type of the track. More...
 
virtual int32_t start () const =0
 Gets the start of the user area of a CD track, in blocks, relative to the session start. More...
 
virtual int32_t totalLength () const =0
 Gets the length of the track including the pre-gap and the post-gap. More...
 
virtual TrackType::Enum type () const =0
 Gets the track type. 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

Defines a CD track.

Member Function Documentation

virtual int32_t end ( ) const
pure virtual

Gets the track end, in blocks, relative to the session start.

After the end there may be also a post-gap.

Returns
block address relative to the session start.
virtual CDIndexList* indexes ( ) const
pure virtual

Gets the list of CD indexes that are defined for the track.

Returns
A pointer to a CDIndexList object. It always points to an existing object and cannot be NULL.
virtual const char* isrc ( ) const
pure virtual

Gets the International Standard Recording Code (ISRC).

This method returns empty string if the track does not have an ISRC.

Returns
A null-terminated string
virtual int32_t length ( ) const
pure virtual

Gets the track length without the pre-gap and the post-gap.

It is the same as (end - start + 1).

To create a track with zero length set the track start and track pre-gap to 0 and the track end and track post-gap to -1.

Returns
length in blocks
virtual CDModeList* modes ( ) const
pure virtual

Gets the list of CD modes that are defined for the track.

Returns
A pointer to a CDModeList object. It always points to an existing object and cannot be NULL.
virtual int32_t postgapEnd ( ) const
pure virtual

Gets the end of the track post-gap, in blocks, relative to the session start.

This is the address of the last block of a CD track. For the last track this is also the last block of the CD session.

Returns
block address relative to the session start.
virtual int32_t pregapStart ( ) const
pure virtual

Gets the start of the pre-gap area of a CD track, in blocks, relative to the session start.

Returns
block address relative to the session start.
See Also
CDTrack::setPregapStart
virtual void setEnd ( int32_t  blocks)
pure virtual

Sets the track end, in blocks, relative to the session start.

This is the address of the last block of the user area of a CD track

After the user area follows the post-gap area. Setting this value to a value different that the post-gap end creates an index marker at the offset specified with the blocks parameter.

For maximum flexibility there is no validation of the track start, track end, pre-gap start, post-gap end, and index markers in this method. The application is responsible for setting the track and the session parameters correctly.

AudioCD begins writing only when the following condition is validated: pre-gap start <= start <= end <= post-gap end.

DataDisc: to create a track with zero length set the track start and track pre-gap to 0 and the track end and track post-gap to -1.

To create a track with zero length set the track start and track pre-gap to 0 and the track end and track post-gap to -1.

Parameters
blocksThe track end, in blocks, relative to the session start.
virtual void setIsrc ( const char *  isrc)
pure virtual

Sets the International Standard Recording Code (ISRC).

The ISRC must be 12 characters in length. If less than 12 characters are used the ISRC is padded with '0' (ASCI 0x30) characters up to length 12. Set the ISRC to empty string to prevent the recording of ISRC.

Parameters
isrcA null-terminated string
virtual void setPostgapEnd ( int32_t  blocks)
pure virtual

Sets the end of the track post-gap, in blocks, relative to the session start.

This is the address of the last block of a CD track. For the last track this is also the last block of the CD session.

The default value for the post-gap end is the track end, which means there will not be a post-gap.

This method does not update any track indexes.

For maximum flexibility there is no validation of the track start, track end, pre-gap start, post-gap end, and index markers in this method. The application is responsible for setting the track and the session parameters correctly.

AudioCD begins writing only when the following condition is validated: pre-gap start <= start <= end <= post-gap end.

DataDisc: to create a track with zero length set the track start and track pre-gap to 0 and the track end and track post-gap to -1.

Parameters
blocksthe end of the post-gap, in blocks, relative to the start of the session
virtual void setPregapStart ( int32_t  blocks)
pure virtual

Sets the track pre-gap, in blocks, relative to the session start.

The default pre-gap start is 0, which means there will not be any pre-gap written.

The first track always has a pre-gap and it is 2 sec. (150 blocks) longer than the one specified in CDTrack ( start() - pregapStart() ). These 150 blocks are written as zeros at the very beginning of the user area and precede the custom pre-gap specified in CDTrack. The Audio CD standard mandates that the first track must have a pre-gap of 2-3 sec.

While PrimoBurner guarantees the minimum pre-gap of 2 sec. at the beginning of the session it does not restrict it to the maximum of 3 sec. This way it is possible to place an arbitrary audio content in the pre-gap of the first track. Such layout creates an Audio CD with the so called "hidden track" because normally the only way to play it is by manual rewinding before the start of track #1. Warning: Specifying the first track pre-gap to be longer than 3 sec. (start() - pregapStart() > 75) violates the Audio CD standard. Some computer drives are known to have problems recognizing such Audio CDs.

The pre-gap start cannot be greater than the length of the track.

For maximum flexibility there is no validation of the track start, track end, pre-gap start, post-gap end, and index markers in this method. The application is responsible for setting the track and the session parameters correctly.

AudioCD begins writing only when the following condition is validated: pre-gap start <= start <= end <= post-gap end.

DataDisc: to create a track with zero length set the track start and track pre-gap to 0 and the track end and track post-gap to -1.

Parameters
blocksThe start of the pre-gap, in blocks, relative to the session start.
See Also
length
virtual void setStart ( int32_t  blocks)
pure virtual

Sets the start of the user area of a CD Track, in blocks, relative to the session start.

The track start must be greater or equal to the start of the track pre-gap.

For maximum flexibility there is no validation of the track start, track end, pre-gap start, post-gap end, and index markers in this method. The application is responsible for setting the track and the session parameters correctly.

AudioCD begins writing only when the following condition is validated: pre-gap start <= start <= end <= post-gap end.

DataDisc: to create a track with zero length set the track start and track pre-gap to 0 and the track end and track post-gap to -1.

Parameters
blocksThe start of the user area of a CD Track, in blocks, relative to the session start.
See Also
setPregapStart
virtual void setType ( TrackType::Enum  trackType)
pure virtual

Sets the type of the track.

The possible values are defined in the TrackType enumeration.

Parameters
trackTypeTrack type.
See Also
TrackType::Enum
CDTrack::type
virtual int32_t start ( ) const
pure virtual

Gets the start of the user area of a CD track, in blocks, relative to the session start.

Returns
block address relative to the session start.
virtual int32_t totalLength ( ) const
pure virtual

Gets the length of the track including the pre-gap and the post-gap.

It is the same as (post-gap - pre-gap + 1)

To create a track with zero length set the track start and track pre-gap to 0 and the track end and track post-gap to -1.

Returns
length in blocks
virtual TrackType::Enum type ( ) const
pure virtual

Gets the track type.

Returns
A constant from the TrackType enumeration.
See Also
TrackType::Enum
CDTrack::setType