Play a sound file.
||Name of the file to be played (typically a WAV or MP3)
|| [optional] This flag determines if the script should wait for the sound to finish before continuing:
1 = wait until sound has finished
0 = continue script while sound is playing (default)
None. (Always returns 1 regardless of success.)
Terminating the script will stop the sound (if it is still playing).
Calling SoundPlay("") can be used to stop a currently playing sound. This has the side effect of also closing the open handle.
If you need to delete a sound file which you have played in the script, you should call SoundPlay("") first to ensure the handle is closed.
SoundPlay(@WindowsDir & "\media\tada.wav", 1)