AudioLoadSound

Top  Previous  Next

Message

 

AudioLoadSound <audiodevicenumber>|<alias> <soundname> <filename>

 

Originator

 

Client

 

Response

 

SyntaxError: insufficient parameters to AudioLoadSound

SyntaxError: invalid parameters to AudioLoadSound

Error: can't find WAV file

Error: invalid WAV file

Error: no such audio device

Info: loaded WAV file as sound <soundname>

 

Response (immediate socket)

 

Success

Failure

 

Details

 

Loads a WAV file into a sound and gives that sound a name, but does not play the sound. (Use PlaySound to play the sound.)

 

The sound is loaded into a specific sound device. If you need to play the same sound on several audio devices, you must load it into a separate sound for each device, or create an alias that refers to sound devices.

 

If you wish, you may give several sounds (on one or more sound devices) the same name, though this is not recommended. However, this feature does allow you to play them all simultaneously with a single PlaySound command.        

 

Revision history

 

Implemented by WhiskerServer version 2.3.

 

See also

 

Audio devices
AudioPlaySound
AudioPlayFile
AudioLoadTone
AudioUnloadSound
AudioGetSoundLength