Quick Links: Download Gideros Studio | Gideros Documentation | Gideros Development Center | Gideros community chat | DONATE
Playing sound continuously using math.huge as loop count does not work? — Gideros Forum

Playing sound continuously using math.huge as loop count does not work?

shsngshsng Member
edited April 2012 in General questions
I read in this forum that to play a sound in an endless loop, use math.huge as the loop count. I tried that in gideros player on the PC but it played only once. I had to resort to using an arbitrary large number (1E38). I hope no one keeps my app running for years... :)

Comments

  • evsevs Member
    Hello,

    Until it's implemented I use a kludge like this...
    local sound = Sound.new("message.wav")
    local channel = sound:play()
     
    local function loop() 
     
    	channel = nil
    	channel = sound:play()
    	channel:addEventListener(Event.COMPLETE, loop)
     
    end
     
    loop()
    Cheers

    evs
Sign In or Register to comment.