Play a sound on the mixer

<mixer>.play( 
filename 
flags = viz.PLAY 
) 
filename
Name of file containing audio in a supported format
flags = viz.PLAY
Specifies one of the following play modes:

Modes

Description

viz.PLAY

Play the sound from the beginning to end once

viz.LOOP

Play the sound from beginning to end on a continuous loop

viz.STOP

Stop playing the sound if currently playing

viz.STOP_LOOP

Stop looping the sound, if currently looping.

viz.PAUSE

Pause the sound, if currently playing.

viz.RESUME

Resume playing the sound, if currently paused.

viz.SOUND_PRELOAD

Preload the sound to prevent any delay when playing sound for first time

Remarks

This command will play the sound on the mixer. If the mixer is currently paused, then the sound will start in a paused state until the mixer is resumed. All effects on the mixer (volume, pitch, filter, ...) will be applied to the sound.

Return Value

None

See also

<mixer>.getPaused
<mixer>.setPaused
<mixer>.stop