:Play() - Plays an Audio File


Class

     aprAudio()

 

Syntax

     :Play([InFile]) --> lSuccess

 

Parameters

 

 

cInFile

Optional: The File Name to Play.

If cInFile is not Passed, aprAudio looks for the File Name stored in :AudioFile

 

Return

     TRUE if Call was made Successfully, otherwise FALSE is returned.

     To see detailed Error information, see :nErr and :cErr

 

Failure typically indicates that the audio file could not be opened or read, or that it is in an unrecognized format.

 

Description

     Plays an Audio File.

     If the cInFile Parameter is passed, it will replace the value in :AudioFile to be used in subsequent calls.

     If no Parameter is passed, aprAudio looks for the File Name stored in :AudioFile.

     If :AudioFile is empty and no Parameter is passed, an Error will occur.

 

The function first determines the audio format of the specified file, and automatically converts it to native Windows audio format if necessary. Asynchronous playback of the audio file continues until the end of the file is reached, or the playback is canceled.

 

See Also

:Cancel(), :GetFormat()