snd_playing (handle);

If the sound with the given handle is still playing, this function returns 1, otherwise 0. The following multimedia instructions can't yet be used by DLL extensions:

Parameters:

handle - Handle of Sound.

Returns:

var = 0, sound of this handle isn't playing
var = 1, sound of this handle is playing

Example:

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

See also:

snd_play, snd_loop, ent_playsound, ent_playloop, snd_stop, snd_tune