Quick Links: Download Gideros Studio | Gideros Documentation | Gideros community chat | DONATE
SoundChannel:setPaused(false) does not work when the sound is at time 0 — Gideros Forum

SoundChannel:setPaused(false) does not work when the sound is at time 0

anskurtanskurt Member
edited November 2013 in Bugs and issues
I have a looping sound that should play only when a sprite is inside an area, so i initiate the sound with:
local GravitySound = Sound.new("Sound/Gravity2.wav")
soundchannel = GravitySound:play()
soundchannel:setLooping(true)
soundchannel:setPaused(true)

and when I want the sound to play:
soundchannel:setPaused(false)

It works most of the time but if soundchannel:getPosition() is 0 the sound does not start to play.

Comments

  • Interesting, tried out >10 times and did not experience the issue, soundchannel:setPaused(false) always starts playing the sound
    How often does it happen to you?
    Or maybe specific platform where it happens?

    Have you tried:
    local GravitySound = Sound.new("main.mp3")
    soundchannel = GravitySound:play(0, true, true)

    Likes: anskurt

    +1 -1 (+1 / -0 )Share on Facebook
  • Thank you, I tried with GravitySound:play(0, true, true) now and it seems to work every time.
    I don't think the time was the issue, I tried to use GravitySound:setPositition(100) but the when the sound didn't play getPosition() returned 0 anyway.
    The platform was IOS 6.0.1with gideros player. It happened around 1/10th of the time.
Sign In or Register to comment.