GUI ScreenIO for Windows

 ScreenIO.com


PlaySound

This API lets you play wave (.WAV) files. 

Client/Server issues

This API will play the sound on the client.  You must specify the location of the sound file on the server. 

To play the sound on the server:

     SET WIN32API-EXECUTE-API-ON-SERVER TO TRUE

File caching

GUI ScreenIO saves some files in a cache directory on the client computer; the default location is:

C:\Windows\Temp_GUI_ScreenIO_Cache

If the file is found in the cache of the client machine, GUI ScreenIO will compare the file time with the file on the server.  If they match, GUI ScreenIO will play the file in the client's cache.

If the file times do not match, GUI ScreenIO will transfer the file from the server to the client's cache, and then play the cached file.

Files

Files available to copy to your system:

Usage

     COPY WIN32API.
     COPY PLAYSND.


     
* ------------------------: Call the API.
*
     SET API-PLAYSOUND TO TRUE.

     CALL 'GSWINAPI' USING WIN32API-PARMS
                           PLAYSOUND-PARMS
                           WIN32API-B
                           WIN32API-C
                           WIN32API-D
                           WIN32API-E
                           WIN32API-F.

Note:  To stop playback of a long .WAV file you previously started, move LOW-VALUE to PLAYSOUND-FILENAME and call this function again.

Parameters specific to this function

PLAYSOUND-FILENAME

Filespec of the .WAV file to play; up to 1024 bytes.

Synchronous/Asynchronous

To launch the sound and immediately return to your program:

     SET PS-PLAY-ASYNCHRONOUS TO TRUE.

To defer returning to your program until the sound has completed:

     SET PS-PLAY-SYNCHRONOUS TO TRUE.

Default/No Default

To play the system default sound if the specified .WAV file is not found:

     SET PS-PLAY-DEFAULT TO TRUE.

To play nothing if the specified .WAV file is not found:

     SET PS-PLAY-NODEFAULT TO TRUE.

WIN32API-PARMS - Used in all GSWINAPI calls

This argument is standard for all CALLs to GSWINAPI. It is used to select the desired API or function, and to return the status of the operation.

WIN32API-RC

Used to return the status of a call to GSWINAPI.  A value of zero is a failure, any other value indicates success.

Recommended usage is to test the 88-level value WIN32API to see if it worked, then to use the text error message to see why it failed.

* ------------------------: If function failed,
*                         :   display the error in a message box.
*
     IF WIN32API-FAILED
       MOVE WIN32API-ERROR-TEXT TO panel-MESSAGE-TEXT
       SET panel-MESSAGE-IN-MESSAGEBOX TO TRUE.

WIN32API-ERROR-CODE

Error code that was returned by Windows.  This is not generally useful unless you have the Windows Platform SDK documentation available to you.

WIN32API-ERROR-TEXT

Plain-text error message that describes why the operation failed.

WIN32API-A through WIN32API-F

The number of these present varies depending on how many arguments are used by the desired function.  These are not used, but must be present because this CALL requires seven arguments.


2000-2006 Norcom, all rights reserved 

TOC

Send feedback to Norcom