PlaySound ( sound_variable[,flags] )

Parameters

sound_variable = variable previously assigned with a LoadSound command.
flags = optional playback flags

Description

This plays a sound previously loaded and assigned to a variable using the LoadSound command.

The returned value is a 'channel handle'. Various channel commands allow you to modifiy the sound
while it is playing in realtime.

The optional flags variable can be of the following values:

1: Loop the sound
2: Pause the sound
3: Loop and pause the sound

If a paused flag is specified, you must use ResumeChannel to actually start the audio output.

Pausing a sound before playback allows you to setup various channel parameters before the sound
actually starts playing.

Example

; Assign a global variable for the sound
Global sndPlayerDie

; Load the sound file into memory

sndPlayerDie=LoadSound("sounds/die.wav")

; Play the sound

chnDie=PlaySound ( sndPlayerDie )

Index

Click here to view the latest version of this page online