Quick Links: Download Gideros Studio | Gideros Documentation | Gideros community chat | DONATE
Sound muted after some time — Gideros Forum

Sound muted after some time

CreativeManixCreativeManix Member
edited August 2015 in Bugs and issues
Hi,

I am facing issue with sound playing. I am using single mp3 file to store many portion of audio. it is difficult for me to use multiple files.
Currently I am using channel to play from particular position and timer to stop at specific point.

Eveything ok for some time, but after 20-30 audio play, my code is not playing any sound. however background music is playing, and other stuffs are proper as well.
-- Function Starts here
local channel= getSound(soundName):play(0, false, true)
channel:setPosition(startPosition)
channel:setPaused(false) --Playing the audio at particular point
local soundStoper=Timer.new(endPosition-startPosition,1)
soundStoper:addEventListener(Event.TIMER, 
function()
	channel:setPaused(true) 
 
end)
--function ends here
I understand that there is a limit in audio channels. however I am not sure how to destory used channel.
Also I am unable to cache sound channel, as this function called from multiple threads.

What is the best way to handle this scenario?

Comments

Sign In or Register to comment.