SoundExists

Family: Sound · One form

What it does

SoundExists answers a question: whether a Sound object still exists. It takes soundID (an integer), and answers an integer. soundID is the id of a Sound object, the one LoadSound returned: it is how the call knows what to act on.

Syntax

SoundExists(soundID integer) → integer

Parameters

NameType
soundIDinteger

Every form returns

integer

Example · generated

sound = LoadSound("assets/sound.wav")DO  Print(SoundExists(sound))  Sync()LOOP

LoadSound is there to give the call something to act on; SoundExists is the line that matters. The DO … LOOP is not decoration: a classic BASIC program ends the moment it runs out of lines, and Sync() is what draws the frame.

37 commands in Sound