Copyright © 2005-2019 MultiMedia Soft

LoadTrackFromCd method

Previous pageReturn to chapter overviewNext page

Remarks

 

Loads the given CD track into the given player.

 

CD tracks can be loaded with the LoadSound method also.

 

The total number of available CD drives can be obtained using the GetCdDrivesCount method.

 

The total number of available audio tracks on the given CD can be obtained using the GetCdNumTracks method.

 

Due to the nature of CD drives, the loading session of a full CD track can be a lengthy operation so, in order to avoid blocking the user interface, the CD track loading session is performed inside a dedicated thread: the container application can be informed about the advancement of the CD track loading session through the CallbackForCdDrivesEvents delegate which is invoked with the nEvent parameter set to:

 

EV_CD_READ_TRACK_START invoked once at the beginning
EV_CD_READ_TRACK_PERC invoked multiple times reporting the current advancement percentage inside the nData1 parameter
EV_CD_READ_TRACK_STOP invoked once the reading is completed

 

 

Syntax

 

[Visual Basic]

Public Function LoadTrackFromCd (

nPlayerIndex as Int16,

nDriveIndex as Int16,

nTrackIndex as Int16

) as enumErrorCodes


 

[C#]

public enumErrorCodes LoadTrackFromCd (

Int16 nPlayerIndex,

Int16 nDriveIndex,

Int16 nTrackIndex

);


 

[C++]

public: enumErrorCodes LoadTrackFromCd (

Int16 nPlayerIndex,

Int16 nDriveIndex,

Int16 nTrackIndex

);


 

 

Parameter

Description

 

 

nPlayerIndex

Number representing the zero-based index of the involved player

nDriveIndex

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

nTrackIndex

Number representing the one-based index of the CD audio track

 

Return value

 

Value

Meaning

 

 

Negative value

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

enumErrorCodes.NOERROR (0)

The method call was successful.