Sound

From Crumbled World Wiki

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.