Copyright © 2005-2023 MultiMedia Soft

CallbackForCdDrivesEvents delegate

Previous pageReturn to chapter overviewNext page

Remarks

 

Callback delegate invoked when an event related to a CD drive occurs: this callback can be set through a call to the CallbackForCdDrivesEventsSet method.

 

For further details about callback delegates see the How to synchronize the container application with the API tutorial.

 

 

Syntax

 

[Visual Basic]

Public Delegate Sub CallbackForCdDrivesEvents (

ByVal nEvent as enumCdDrivesEvents,

ByVal nCdDrive as Int32,

ByVal nData1 as Int32,

ByVal nData2 as Int32,

ByVal nData3 as Int32

)


 

[C#]

public delegate void CallbackForCdDrivesEvents (

enumCdDrivesEvents nEvent,

Int32 nCdDrive,

Int32 nData1,

Int32 nData2,

Int32 nData3

)


 

[C++]

public delegate void CallbackForCdDrivesEvents (

enumCdDrivesEvents nEvent,

Int32 nCdDrive,

Int32 nData1,

Int32 nData2,

Int32 nData3

)


 

 

Parameter

Description

 

 

nEvent

Event reported by the CD drive.

Supported values are the following:

Mnemonic constant

Value

Meaning with data parameters

EV_CD_READ_TRACK_START

0

Occurs at the beginning of a new CD track's loading session started through the LoadTrackFromCd method.

 

Involved data parameters:

nData1: Number representing the one-based index of the CD audio track that is being loaded.

EV_CD_READ_TRACK_PERC

1

Occurs during a CD track loading session, started through the LoadTrackFromCd method, in order to notify the loading advancement percentage.

 

Involved data parameters:

nData1: Number representing the one-based index of the CD audio track that is being loaded.

nData2: Number representing the CD track loading advancement percentage.

EV_CD_READ_TRACK_STOP

2

Occurs at the end of a CD track's loading session started through the LoadTrackFromCd method.

 

Involved data parameters:

nData1: Number representing the one-based index of the CD audio track that is being loaded.

EV_CD_STATUS_CHANGED

3

If the automatic CD monitoring is enabled, occurs whenever an installed CD drive changes its status: see the EnableCdMonitor method for details about enabling CD drives status monitoring.

 

Involved data parameters:

nData1: Number representing the CD drive status.Supported values are the following:

Mnemonic Value

Value

Meaning

CD_STATUS_OPEN

0

The CD drive door is open

CD_STATUS_CLOSED

1

The CD drive door is closed but no CD is available inside

CD_STATUS_READY

2

The CD drive door is closed and a CD is available inside and ready to play

CD_STATUS_BUSY

3

The CD drive door is closed and a CD is available inside but the drive is busy loading an audio track from the CD

EV_CDDB_SERVERS_AVAIL

4

Occurs when the list of CDDB servers, requested through a previous call to the CddbRequestServersList method, is available.

 

Involved data parameters:

nData1: The number of CDDB servers found. If this parameter value is 0, this means that an error occurred during the connection to the CDDB site.

EV_CDDB_ALBUM_INFO_AVAIL

5

Occurs when the CDDB server returns the CD album information requested through a previous call to the CddbRequestAlbumInfo method.

After receiving this event it will be possible:

Obtaining the CD album info through the CddbGetAlbumInfo method.
Getting each CD track title through the CddbGetTrackTitle method.

 

Involved data parameters:

nData1: Boolean value that specifies if the CDDB information was retrieved successfully. Supported values are the following:

Mnemonic Value

Meaning

false

The request failed, check the LastError property value in order to see the possible cause of the error

true

The request succeeded and CDDB information is available

EV_CD_COVER_URLS_AVAIL

6

Occurs when the Internet URLs of the CD cover's pictures have been obtained.

 

Involved data parameters:

nData1: The result of the CD cover retrieval attempt. The result of the CD cover retrieval attempt.

Value

Meaning

Negative value

The request failed, check the LastError property value in order to see the error code meaning

enumErrorCodes.ERR_NOERROR (0)

The operation was successful.

EV_CD_COVER_SMALL_FILE_AVAIL

7

Occurs when the small version of the CD cover's picture file has been downloaded.

 

Involved data parameters:

nData1: The result of the CD cover retrieval attempt.

Value

Meaning

Negative value

The request failed, check the LastError property value in order to see the error code meaning

enumErrorCodes.ERR_NOERROR (0)

The operation was successful.

EV_CD_COVER_MEDIUM_FILE_AVAIL

8

Occurs when the medium version of the CD cover's picture file has been downloaded.

 

Involved data parameters:

nData1: The result of the CD cover retrieval attempt.

Value

Meaning

Negative value

The request failed, check the LastError property value in order to see the error code meaning

enumErrorCodes.ERR_NOERROR (0)

The operation was successful.

EV_CD_COVER_LARGE_FILE_AVAIL

9

Occurs when the large version of the CD cover's picture file has been downloaded.

 

Involved data parameters:

nData1: The result of the CD cover retrieval attempt.

Value

Meaning

Negative value

The request failed, check the LastError property value in order to see the error code meaning

enumErrorCodes.ERR_NOERROR (0)

The operation was successful.

nCdDrive

Zero-based index of the CD drive reporting the event

nData1

First 32 bits integer value containing event specific data; its value and meaning depends upon the specific event received: see the table above for possible values.

nData2

Second 32 bits integer value containing event specific data; its value and meaning depends upon the specific event received: see the table above for possible values.

nData3

Third 32 bits integer value containing event specific data; currently unused, reserved for future developments.