snd_play ( SOUND*, var Volume, var Balance): handle

snd_loop ( SOUND*, var Volume, var Balance): handle

Plays a SOUND object. snd_loop plays the sound endlessly until it is stopped explicitly. The function returns a sound handle which allows further manipulation or prematurely stopping the sound. The handle is valid as long as this sound plays.

Parameters:

SOUND* SOUND pointer from a global SOUND object (.ogg or .wav) or from a snd_create call.
Volume volume (0..100).
Balance stereo balance (-100 .. +100). Negative values turns the sound to the left, positive to the right speaker..

Returns:

Sound handle.

Speed:

Medium

Remarks:

Example:

SOUND* whamm_snd = "whamm.wav";
var whamm_handle; 
... 
whamm_handle = snd_play(whamm_snd, 100, 0);

See also:

SOUND, ent_playsound, snd_stop, snd_pause, snd_start, snd_tune, snd_playing, media_play

► latest version online