audio.play on specific channel intermittently does not work?

I have a problem that intermittently some audio for my game is not working. It can work fine for a couple of minutes but then suddenly go silent and not work for that channel.
Any ideas why? Any known issues?

Details
* using this particular channel for a few different sounds that can occur during the game
* swap use of sounds on the channel as need be
* I have put the following code in the game loop and everything seems ok when the sound fails…

 print ("Audio Active/Playing/Paused/Volume: ",  
 audio.isChannelActive(Constants.AUDIO\_SFX),  
 audio.isChannelPlaying(Constants.AUDIO\_SFX),  
 audio.isChannelPaused(Constants.AUDIO\_SFX),  
 audio.getVolume(Constants.AUDIO\_SFX)  
 )  

* Code example of what I’m doing at various points, in terms of swapping use of the channel for different sounds

if audio.isChannelActive( Constants.AUDIO\_SFX ) then audio.stop(Constants.AUDIO\_SFX) end audio.play(runningSound, {channel=Constants.AUDIO\_CANOPY\_SFX, loops=-1, fadein=10 } ) [import]uid: 140210 topic_id: 34541 reply_id: 334541[/import]

could it be a timing thing? Is doing an “audio.play” straight after an “audio.stop” on the same channel an issue? should there be a pause before the play perhaps?

any other ideas on how to fault find the cause here beyond the print statement I’ve posted in the original post? [import]uid: 140210 topic_id: 34541 reply_id: 137460[/import]

I’m starting to see it might be the “fadein” value. With the following code with a fadein value set the sound doesn’t work, but if put to 0 then it does work

 local runningSound = audio.loadSound("media/sounds/rundirt.mp3")  
 if audio.isChannelActive( Constants.AUDIO\_RUNNING\_SFX ) then  
 audio.stop(Constants.AUDIO\_RUNNING\_SFX)  
 end  
 audio.play(runningSound, {channel=Constants.AUDIO\_RUNNING\_SFX, loops=-1, fadein=20 } )   
 -- \<=== WHEN SET FADE IN TO ZERO HERE IT THEN WORKS  
 if audio.isChannelActive( Constants.AUDIO\_RUNNING\_SFX ) then  
 audio.stop(Constants.AUDIO\_RUNNING\_SFX)  
 end  
 audio.play(runningSound, {channel=Constants.AUDIO\_RUNNING\_SFX, loops=-1, fadein=0 } )  

[import]uid: 140210 topic_id: 34541 reply_id: 137466[/import]

could it be a timing thing? Is doing an “audio.play” straight after an “audio.stop” on the same channel an issue? should there be a pause before the play perhaps?

any other ideas on how to fault find the cause here beyond the print statement I’ve posted in the original post? [import]uid: 140210 topic_id: 34541 reply_id: 137460[/import]

I’m starting to see it might be the “fadein” value. With the following code with a fadein value set the sound doesn’t work, but if put to 0 then it does work

 local runningSound = audio.loadSound("media/sounds/rundirt.mp3")  
 if audio.isChannelActive( Constants.AUDIO\_RUNNING\_SFX ) then  
 audio.stop(Constants.AUDIO\_RUNNING\_SFX)  
 end  
 audio.play(runningSound, {channel=Constants.AUDIO\_RUNNING\_SFX, loops=-1, fadein=20 } )   
 -- \<=== WHEN SET FADE IN TO ZERO HERE IT THEN WORKS  
 if audio.isChannelActive( Constants.AUDIO\_RUNNING\_SFX ) then  
 audio.stop(Constants.AUDIO\_RUNNING\_SFX)  
 end  
 audio.play(runningSound, {channel=Constants.AUDIO\_RUNNING\_SFX, loops=-1, fadein=0 } )  

[import]uid: 140210 topic_id: 34541 reply_id: 137466[/import]