Sound

From Crumbled World Wiki
Revision as of 14:26, 5 July 2025 by Anders (talk | contribs) (Created page with "{{:SoundExampleCode}} ==Constructor== {| class="wikitable" !|function !|description |- |Sound(string fileName, SoundType type) | |- |} ==Functions== {| class="wikitable" !|return !|function !|description |- |String |getName() |Get sound file name. |- |bool |successFullyLoaded() |Get if the sound was successfully loaded. |- |SoundSource |playSound(float so...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

SoundExampleCode

Constructor

function description
Sound(string fileName, SoundType type)

Functions

return function description
String getName() Get sound file name.
bool successFullyLoaded() Get if the sound was successfully loaded.
SoundSource playSound(float soundLevel, bool loop) Play the sound.

soundLevel value bettwen [0-1] 1 max volume. loop if the sound should loop for all eternity.

int getSoundBufferId() Get sound buffer id.
int getPlayTime() Get the play time in seconds.