Sounds still stops randomly on iOS

@maxnb
It’s not a Corona or Apple bug.
I’ve answered this in a reply to another one of your posts here:
http://developer.coronalabs.com/forum/2012/09/22/audio-soundsstreams-not-working-after-invoking-siri-or-getting-phone-call [import]uid: 70847 topic_id: 29055 reply_id: 135837[/import]

I’m not sure this is Appl’s fault since I can easily reproduce this in simulator on my Mac and also on my iPhone and iPad. You can take any simple application load 2-3 sounds and assign these sounds to few images which will play them as soon as you tap them. Now press the images without stop for 40-60 seconds and application will suddenly go mute and no sound will come out from it untill you shut it down and restart the app.

As said it can even be reproduced on Coronas Simulator on Mac, have little harder time reproducing it on Windows not sure why. This thing is driving me crazy as I can’t find workaround it and its been arround for few months if I remember correctly- I hope they fix this.

I will test with preview for ios6.1 3 but I do not wish my application to target iOS6.1, I want it to support everything from 4.3 and up. [import]uid: 13099 topic_id: 29055 reply_id: 135795[/import]

and retested on iOS 6.1 beta 3 and still app went mute in 20 seconds constatly tapping on an image which had audio attached to it. I’ll create sample app that all can test and easily see for them self the problem. [import]uid: 13099 topic_id: 29055 reply_id: 135798[/import]

Here is the code that will 100% recreate the problem even in Corona Simulator on the Mac and ofcourse bug is allways present on devices. Just press the button for 40-60 seconds or till the sound stops.

My testing results:
first run: 99 taps app goes mute
second run: 90 taps app goes mute

It seems to me there is a limited number of times corona application can play sounds before its sound engine dies from overheating and everything goes mute.

Hope this can help corona team replicate and fix this wonderful bug.

local text1  
count = 0  
function playSound()  
 count = count + 1  
 local click = audio.loadStream("any\_short\_1sec\_sound\_here.mp3")  
 audio.play(click, {loops=0, channel=1 })  
 text1.text = "count: "..count  
end  
  
local myRectangle = display.newRect(display.contentWidth \* 0.5-180, display.contentHeight \* 0.5-80, 360, 160)  
myRectangle:setFillColor(140, 140, 140)  
myRectangle:addEventListener( "tap", playSound )  
text1 = display.newText( "count: 0", 0, 0, native.systemFontBold, 34 )  
text1:setTextColor( 255 )  
text1:setReferencePoint( display.CenterReferencePoint )  
text1.x, text1.y = display.contentWidth \* 0.5, display.contentHeight \* 0.5  

My Corona build is 986 and I’ve been aware of this problem for few months. [import]uid: 13099 topic_id: 29055 reply_id: 135800[/import]

@maxnb
It’s not a Corona or Apple bug.
I’ve answered this in a reply to another one of your posts here:
http://developer.coronalabs.com/forum/2012/09/22/audio-soundsstreams-not-working-after-invoking-siri-or-getting-phone-call [import]uid: 70847 topic_id: 29055 reply_id: 135837[/import]