Help Center
Help CenterAfxNovaAudio

CCDAudio Class

Members (32)

BackwardMoves to the previous track.CloseCloses the device or file and any associated resources. MCI unloads a device when all instances of the device or all files are closed.CloseDoorCloses the CDRom door.ConstructorCreates an instance of the `CCDAudio` class.ForwardMoves to the next track.GetAllTracksLengthReturns the total length in seconds of all the tracks.GetAllTracksLengthStringReturns the total length of all the tracks.GetCurrentPosReturns the current track position in seconds.GetCurrentPosStringReturns the current track position.GetCurrentTrackReturns the current track number.GetErrorStringRetrieves a string that describes the specified MCI error code.GetLastErrorRetrieves a The last MCI error code.GetTrackLengthReturns the length in seconds of the given track.GetTrackLengthStringReturns the length of the given track.GetTracksCountReturns the count of tracks.GetTrackStartTimeReturns the start time of the given track.GetTrackStartTimeStringReturns the start time of the given track.IsMediaInsertedChecks whether CD media is inserted.IsPausedChecks whether is in paused mode.IsPlayingChecks whether is in play mode.IsReadyChecks if the device is ready.IsSeekingChecks whether is in seeking mode.IsStoppedChecks whether is in stopped mode.OpenInitializes the device.OpenDoorOpens the CDRom door.PausePauses playing CD Audio.PlayStarts playing CD Audio.PlayFromStarts playing CD Audio on the given track.PlayFromToStarts playing CD Audio from a given track to a given track.StopStops playing CD Audio.ToEndSets the position to the end of the audio CD.ToStartSets the position to the start of the audio CD.

Documentation

CCDAudio Class

The CCDAudio class allows to play a CD Rom using MCI.

Constructor

NameDescription
ConstructorCreates an instance of the CCDAudio class.

Methods

NameDescription
BackwardMoves to the previous track.
CloseCloses the device or file and any associated resources. MCI unloads a device when all instances of the device or all files are closed.
CloseDoorCloses the CDRom door.
ForwardMoves to the next track.
GetAllTracksLengthReturns the total length in seconds of all the tracks.
GetAllTracksLengthStringReturns the total length of all the tracks.
GetCurrentPosReturns the current track position in seconds.
GetCurrentPosStringReturns the current track position.
GetCurrentTrackReturns the current track number.
GetErrorStringRetrieves a string that describes the specified MCI error code.
GetLastErrorRetrieves a The last MCI error code.
GetTrackLengthReturns the length in seconds of the given track.
GetTrackLengthStringReturns the length of the given track.
GetTracksCountReturns the count of tracks.
GetTrackStartTimeReturns the start time of the given track.
GetTrackStartTimeStringReturns the start time of the given track.
IsMediaInsertedChecks whether CD media is inserted.
IsPausedChecks whether is in paused mode.
IsPlayingChecks whether is in play mode.
IsReadyChecks if the device is ready.
IsSeekingChecks whether is in seeking mode.
IsStoppedChecks whether is in stopped mode.
OpenInitializes the device.
OpenDoorOpens the CDRom door.
PausePauses playing CD Audio.
PlayStarts playing CD Audio.
PlayFromStarts playing CD Audio on the given track.
PlayFromToStarts playing CD Audio from a given track to a given track.
StopStops playing CD Audio.
ToEndSets the position to the end of the audio CD.
ToStartSets the position to the start of the audio CD.

Constructor

Creates an instance of the CCDAudio class.

CONSTRUCTOR CCDAudio
Usage example:
DIM pAudio AS CCDAudio
pAudio.Open
pAudio.Play

Backward

Moves to the previous track.

FUNCTION Backward () AS BOOLEAN
Return value

TRUE or FALSE.


Close

Closes the device or file and any associated resources. MCI unloads a device when all instances of the device or all files are closed.

FUNCTION Close () AS MCIERROR
Return value

Returns zero if successful or an error otherwise.


CloseDoor

Closes the CDRom door.

FUNCTION CloseDoor () AS MCIERROR
Return value

Returns zero if successful or an error otherwise.


Forward

Moves to the next track.

FUNCTION Forward () AS BOOLEAN
Return value

TRUE or FALSE.


GetAllTracksLength

Returns the total length in seconds of all the tracks.

FUNCTION GetAllTracksLength () AS LONG

GetAllTracksLengthString

Returns the total length of all the tracks as a string.

FUNCTION GetAllTracksLengthString () AS CWSTR

GetCurrentPos

Returns the current track position in seconds.

FUNCTION GetCurrentPos () AS LONG

GetCurrentPosString

Returns the current track position as a string.

FUNCTION GetCurrentPosString () AS CWSTR

GetCurrentTrack

Returns the current track number.

FUNCTION GetCurrentTrack () AS LONG

GetErrorString

Retrieves a string that describes the specified MCI error code.

FUNCTION GetErrorString (BYVAL dwError AS MCIERROR = 0) AS CWSTR
ParameterDescription
dwErrorOptional. The MCI error code. If this parameter is omitted, the last error code is used.

GetLastError

Returns the last MCI error code.

FUNCTION GetLastError () AS MCIERROR

GetTrackLength

Returns the length in seconds of the given track.

FUNCTION GetTrackLength (BYVAL nTrack AS LONG) AS LONG
ParameterDescription
nTrackThe track number.

GetTrackLengthString

Returns the length of the given track as a string.

FUNCTION GetTrackLengthString (BYVAL nTrack AS LONG) AS CWSTR
ParameterDescription
nTrackThe track number.

GetTracksCount

Returns the count of tracks.

FUNCTION GetTracksCount () AS LONG

GetTrackStartTime

Returns the start time of the given track.

FUNCTION GetTrackStartTime (BYVAL nTrack AS LONG) AS LONG
ParameterDescription
nTrackThe track number.

GetTrackStartTimeString

Returns the start time of the given track as a string.

FUNCTION GetTrackStartTimeString (BYVAL nTrack AS LONG) AS CWSTR
ParameterDescription
nTrackThe track number.

IsMediaInserted

Checks whether CD media is inserted.

FUNCTION IsMediaInserted () AS BOOLEAN
Return value

TRUE or FALSE.


IsPaused

Checks whether is in paused mode.

FUNCTION IsPaused () AS BOOLEAN
Return value

TRUE or FALSE.


IsPlaying

Checks whether is in play mode.

FUNCTION IsPlaying () AS BOOLEAN
Return value

TRUE or FALSE.


IsReady

Checks if the device is ready.

FUNCTION IsReady () AS BOOLEAN
Return value

TRUE or FALSE.


IsSeeking

Checks whether is in seeking mode.

FUNCTION IsSeeking () AS BOOLEAN
Return value

TRUE or FALSE.


IsStopped

Checks whether is in stopped mode.

FUNCTION IsStopped () AS BOOLEAN
Return value

TRUE or FALSE.


Open

Initializes the device.

FUNCTION Open () AS DWORD
Return value

Returns zero if successful or an error otherwise.


OpenDoor

Opens the CDRom door.

FUNCTION OpenDoor () AS MCIERROR
Return value

Returns zero if successful or an error otherwise.


Pause

Pauses playing CD Audio.

FUNCTION Pause () AS MCIERROR
Return value

Returns zero if successful or an error otherwise.


Play

Starts playing CD Audio.

FUNCTION Play () AS MCIERROR
Return value

Returns zero if successful or an error otherwise.


PlayFrom

Starts playing CD Audio on the given track.

FUNCTION PlayFrom (BYVAL nTrack AS LONG) AS MCIERROR
ParameterDescription
nTrackThe track number.
Return value

Returns zero if successful or an error otherwise.


PlayFromTo

Starts playing CD Audio from a given track to a given track.

FUNCTION PlayFromTo (BYVAL nStartTrack AS LONG, BYVAL nEndTrack AS LONG) AS MCIERROR
ParameterDescription
nStartTrackThe starting track number.
nEndTrackThe ending track number.
Return value

Returns zero if successful or an error otherwise.


Stop

Stops playing CD Audio.

FUNCTION Stop () AS MCIERROR

ToEnd

Sets the position to the end of the audio CD.

FUNCTION ToEnd () AS MCIERROR

ToStart

Sets the position to the start of the audio CD.

FUNCTION ToStart () AS MCIERROR