# Command: LoadSound

LoadSound (filename$) Definition:

Load a sound file into memory.

Parameter Description:

filename$ = valid string with path/filename to the sound file

Command Description:

This command loads a sound file (.WAV or .MP3) into memory. It returns a number if successful, or 0 if there was a problem loading the sound. You must assign value this returns to a variable (preferably a Global variable) for subsequent playback using (PlaySound}. Look at the example.

Example:

; Assign a global variable for the sound Global sndPlayerDie ; Load the sound file into memory sndPlayerDie=LoadSound("sounds/die.wav") ; Play the sound PlaySound sndPlayerDie

Index