StopSound

Family: Sound · One form

What it does

StopSound makes something happen at once: it stops. It takes soundID (an integer), and returns nothing. soundID is the id of a Sound object, the one LoadSound returned: it is how the call knows what to act on.

Syntax

StopSound(soundID integer)

Parameters

NameType
soundIDinteger

Every form returns

nothing

Example · generated

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

LoadSound is there to give the call something to act on; StopSound 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