Sound:GetLoop(Number soundhandler, Boolean return)
Determines if a sound buffer is looping or not.
Number soundhandler - a Number variable handling the sound buffer loaded using Sound:Load.
Boolean return - a Boolean variable that will handle the sound buffer's loop status.
#include "console.kh" function main() { Var:Number snd; //declares a Number variable to be the sound-handler Var:Boolean looping; //declares a Boolean variable to be the looping flag Sound:Load("bgmusic.ogg", snd) //loads a sound file to buffer to be handled by 'snd' Sound:Play(snd) //plays the sound buffer handled by 'snd' Sound:GetLoop(snd, looping) //determines if 'snd' is looping if (looping) { write("it is looping") } else { write("it is not looping") } end() }