iOS Notification Bar Mutes Corona Sounds?

This may just be me, however I have tested it with other Corona apps and noticed the same symptoms.

If you’re running a Corona app and click on any notification from the notification bar, when you return to the Corona app - the sound has completely disappeared.

Would be handy if anybody else could confirm this behaviour - if so, and this isn’t a known bug I can submit a case. Never done that before and not sure how to check to see if it’s an existing problem, so perhaps somebody from ANSCA maybe able to help confirm and/or the procedure to handling this.

Many thanks, [import]uid: 33275 topic_id: 27447 reply_id: 327447[/import]

I notice the same thing. Happens in all my Corona apps. When you quit and come back, 80% of the time the audio will stop playing. It’s super annoying! [import]uid: 51654 topic_id: 27447 reply_id: 111524[/import]

I never notice it when switching between apps - only if I leave via the Notification Center… [import]uid: 33275 topic_id: 27447 reply_id: 111525[/import]

Build 791 contained new audio fixes/workarounds that might have corrected this problem. Please try the latest.
[import]uid: 7563 topic_id: 27447 reply_id: 111546[/import]

Hi Eric, thanks for the reply. I’m using the latest daily build (june 1st); do you want me to file a bug report? [import]uid: 33275 topic_id: 27447 reply_id: 111552[/import]

Yes, please file a bug report with us. Please include a simple reproducible test case with instructions on how to reproduce the problem.

Thanks!

[import]uid: 7563 topic_id: 27447 reply_id: 111560[/import]

Hi Eric, just to let you know this has been submitted. It’s in no way a show-stopper, but thought worthy to bring to your attention. [import]uid: 33275 topic_id: 27447 reply_id: 111653[/import]

Thanks. We have a lot of high priority issues, so I don’t know when this will get looked at, but we hopefully won’t lose track of it now that there is a bug in the database.

[import]uid: 7563 topic_id: 27447 reply_id: 111709[/import]

this issue also happens if someone calls in to your device. When the call ends and you return back to the game, there is no audio. [import]uid: 66228 topic_id: 27447 reply_id: 113436[/import]

FYI, I started looking at this bug. It looks like it is an iOS 5 bug with the way an app backgrounds via the notification center. iOS seems to generate a resign callback, then an active callback, and then another resign callback followed by a background callback. This resign/active/resign pattern causes us to suspend the audio engine, restore it, and then suspend it again. The problem seems to be that trying to restore audio while the app is actually trying to background leads to even more catastrophic bugs in Apple’s Core Audio backend which brings down audio in the app completely.

So the first Apple bug is the unnecessary active/resign pair of callbacks.
This leads us into the second bug of trying to restore audio when Core Audio is probably trying to shut things down which breaks Core Audio completely for the app.

Trying not to break any NDAs, I will say my brief encounter with iOS 6 betas has been promising. I would be interested in hearing any bad results on iOS 6 beta.

Addendum: We are still trying to figure out how to workaround this. It looks like iOS 4.3 has this problem too. Unfortunately, Apple changed the event callback sequence/system between 4 and 5 so the initial workaround idea we started thinking about in 5 won’t work with 4.
[import]uid: 7563 topic_id: 27447 reply_id: 117946[/import]

Hello, we just committed a workaround for this problem. It should appear in the next Daily Build (874). Would you please give it a test?

Also, we filed some Apple bugs. It might be a good idea to file some duplicate bugs referring to ours and ‘voting’ for them. You may mention you are using Corona and are affected by these issues.

radar://12022630 Core Audio breaks when leaving an app via Notification Center and then returning
radar://12022774 Redundant WillResignActive/BecomeActive when leaving app via Notification Center
radar://12022812 AudioSessionSetActive should not return errors if setting to false when already false
radar://12022855 Need API: AudioSessionGetActive() to balance AudioSessionSetActive
radar://12022872 Want Audio Session Interruptions to trigger for all events that require it
radar://12022894 Want automatic handling for OpenAL/Core Audio interruptions like AVFoundation
[import]uid: 7563 topic_id: 27447 reply_id: 118779[/import]

Hi Eric, thanks for the heads up.

I will test on the daily build when 874 becomes available. Thanks for submitting the Apple bugs, I’ll duplicate these requests now. [import]uid: 33275 topic_id: 27447 reply_id: 118825[/import]

Hi Eric, hope you get to see this.

I’ve had an e-mail back from Apple re: one of the bug reports I sent (duplicates of those you listed), asking whether or not this issue still occurs on iOS6 beta 4. I’ve yet to install the beta, so was wondering whether you knew if iOS appears to have solved the issue?

I’d like to reply to them, but I’m not going to be able to let them know this just of yet - holding back on iOS6 for now. [import]uid: 33275 topic_id: 27447 reply_id: 118888[/import]

Let them close the first issue. The other 5 are still open.
We do need you guys to start testing iOS 6 betas though to prevent new bad regression issues from shipping (to prevent the debacle we experienced from iOS 5).
[import]uid: 7563 topic_id: 27447 reply_id: 118902[/import]