snd_playing (handle)

Determines if the sound with the given handle is still playing.

Parameters:

handle - sound handle that was returned by the play function.

Returns:

0 if a sound with this handle isn't playing, A7.82 otherwise the current play position within the sound buffer in bytes.

Example:

SOUND* whosh = whosh.wav;

...
var whosh_handle = ent_playsound(my,whosh,100); 
while(snd_playing(whosh_handle)) // while sound ist playing
{ 
  snd_tune(whosh_handle,(10*total_ticks)%100,0,0);
  wait(1);
}

See also:

snd_play, ent_playsound, snd_pause, snd_start, snd_stop, snd_tune

► latest version online