LoadSoundOGG

Family: Sound · 2 forms

What it does

LoadSoundOGG loads OGG on a Sound object. It takes iID (an integer) and sFilename (a string), and returns nothing. That is the first of 2 forms.

Syntax

1
LoadSoundOGG(iID integer, sFilename string)
2
LoadSoundOGG(sFilename string) → integer

Parameters

NameTypeIn forms
iIDinteger1
sFilenamestringall

What each form returns

1LoadSoundOGG(1, "assets/sound.wav")nothing
2soundOGG = LoadSoundOGG("assets/sound.wav")integer

Example · generated

Form 1, you choose the id yourself

LoadSoundOGG(1, "assets/sound.wav")DO  Sync()LOOP

Form 2, the command hands back the id

soundOGG = LoadSoundOGG("assets/sound.wav")DO  Sync()LOOP

LoadSoundOGG is called with values of the types its signature asks for. 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.

Related commands

37 commands in Sound