sound_is_playing()

Checks whether the sound is currently playing from the specified audio player slot.

Syntax

sound_is_playing(slot)

Parameters

Parameter Type Description Comment
slot Number The index of the audio player slot (0 to 7). There are 8 slots available (0-7).

Return Value

Examples

Check if the sound is playing from the first audio slot (slot 0)

sound_is_playing(0); // returns 1 if playing, 0 if not

Check if the sound is playing from the second audio slot (slot 1)

sound_is_playing(1); // returns 1 if playing, 0 if not

See also

beep
siren
sound_load
sound_unload
sound_play
sound_stop
sound_is_playing