Copyright © 2006-2019 MultiMedia Soft

CdDriveReadOffsetSet method

Previous pageReturn to chapter overviewNext page

Remarks

 

Sets the read offset of the given CD drive.

 

This method can be used to compensate for the fact that most drives will read audio data from CDs at a slight offset from where they ideally should. Different drive models will have differing offsets, a list of which can be found on this link.

 

 

Syntax

 

[Visual Basic]

control.CdDriveReadOffsetSet (

nCdDriveIndex as integer,

nOffset as long

) as enumErrorCodes


 

[C++]

short control.CdDriveReadOffsetSet (

short nCdDriveIndex,

long nOffset

);


 

 

Parameter

Description

 

 

nCdDriveIndex

Number representing the zero-based index of the involved CD drive.

Installed CD drives can be enumerated using the GetCdDrivesCount method and their friendly description can be retrieved through the GetCdDriveDesc method.

nOffset

Number representing the read offset expressed in bytes.

When a negative offset is used, reading the beginning of the first track will require accessing the lead-in, and when a positive offset is used, reading the end of the last track will require accessing the lead-out. The drive may not support that (overreading), in which case those parts will be replaced with silence.

 

 

Return value

 

Value

Meaning

 

 

Negative value

An error occurred (see the LastError property for further error details)

enumErrorCodes.ERR_NOERROR (0)

The call was successful.