Audio sounds/streams not working after invoking siri or getting phone call

Posted this bug officially, but wanted to know if anyone else is getting this and it’s not just me
iPhone 4S / iOS 6/ xCode 4.5 and build 919

loop audio or have streams playing then invoke siri (by holding on the home button) or receive a phone call
return to game
The audio will not resume after you have suspended and no audio works unless you restart the app (suspending/resuming again does not fix) For the record I stop or pause my audio when going into suspend, but nothing seems to fix this.

This works normally on regular suspend/resume (hitting home button, exiting app, ect…) it’s just when you invoke something that would require you to talk into your phone that everything goes hay-wire

You can try this with the Corona sample audio player included in the SDK, play an an audio clip and make sure to loop it then, hold down home button or receive a phone call!
I wonder if this is related to iOS 6 or maybe I just hadn’t noticed it before. [import]uid: 88628 topic_id: 31242 reply_id: 331242[/import]

I just confirmed what you are talking about with Siri on iPhone 5.

Apple seems to break something in audio every release. I know audio interruptions used to work in 3.1 to 5.1 through I usually test with Clock.app’s alarm and not phone calls. (They are supposed to trigger the same events but Alarms are easier to setup.) I’m pretty sure we tested actual phone calls in 3.1 and 4.2.

I don’t know if the Siri bug was in 5.1. However, we had to workaround a Notification Center bug last time around. If you can test 5.1/Sire, please let us know.

Anyway, please file 2 bugs, one with us, and one with Apple.

Please provide us a very simple test case that reproduces the problem. This is just so I make sure I test the way you are using it. Mention that Eric Wing confirmed it and should be directed to Eric.

Then please file a bug with Apple about this so they know. Please include as much information as you can about which iOS versions it occurs in. You can say that you are using Corona and it looks like it is new and Eric Wing has confirmed a bunch of it and will likely be filing a follow up bug report soon.

This one has me worried because stepping through the code, we are following Apple’s rules, but it looks like things just break anyway. I’m not sure if we’re going to be able to workaround this.

[import]uid: 7563 topic_id: 31242 reply_id: 124953[/import]

I just noticed it today while testing my app and getting a phone call, the best way to reproduce the bug is to build the corona SDK Audio player in samples/media/audio-player using the current build and xCode 4.5 on an iOS 6 device

Launch Audio player (iOS6, latest build 919)

  • set loop to yes
  • hit play
  • hold home button to invoke siri (if you are not on the internet, siri won’t launch and you will not have this problem)
  • tap the screen to resume the app
  • no audio is playing and no new audio will play even if you resume/stop again

I played around with other released Corona apps ( grizzly mannor /little generals, which I haven’t updated in a while) and they are all having the same issue, so could be a big issue. I even tried Jet pack joy ride, and although the music still resumed the other sounds all failed, so I guess this platform wide

I will try to file a bug with Apple [import]uid: 88628 topic_id: 31242 reply_id: 124955[/import]

I just confirmed what you are talking about with Siri on iPhone 5.

Apple seems to break something in audio every release. I know audio interruptions used to work in 3.1 to 5.1 through I usually test with Clock.app’s alarm and not phone calls. (They are supposed to trigger the same events but Alarms are easier to setup.) I’m pretty sure we tested actual phone calls in 3.1 and 4.2.

I don’t know if the Siri bug was in 5.1. However, we had to workaround a Notification Center bug last time around. If you can test 5.1/Sire, please let us know.

Anyway, please file 2 bugs, one with us, and one with Apple.

Please provide us a very simple test case that reproduces the problem. This is just so I make sure I test the way you are using it. Mention that Eric Wing confirmed it and should be directed to Eric.

Then please file a bug with Apple about this so they know. Please include as much information as you can about which iOS versions it occurs in. You can say that you are using Corona and it looks like it is new and Eric Wing has confirmed a bunch of it and will likely be filing a follow up bug report soon.

This one has me worried because stepping through the code, we are following Apple’s rules, but it looks like things just break anyway. I’m not sure if we’re going to be able to workaround this.

[import]uid: 7563 topic_id: 31242 reply_id: 124953[/import]

I just noticed it today while testing my app and getting a phone call, the best way to reproduce the bug is to build the corona SDK Audio player in samples/media/audio-player using the current build and xCode 4.5 on an iOS 6 device

Launch Audio player (iOS6, latest build 919)

  • set loop to yes
  • hit play
  • hold home button to invoke siri (if you are not on the internet, siri won’t launch and you will not have this problem)
  • tap the screen to resume the app
  • no audio is playing and no new audio will play even if you resume/stop again

I played around with other released Corona apps ( grizzly mannor /little generals, which I haven’t updated in a while) and they are all having the same issue, so could be a big issue. I even tried Jet pack joy ride, and although the music still resumed the other sounds all failed, so I guess this platform wide

I will try to file a bug with Apple [import]uid: 88628 topic_id: 31242 reply_id: 124955[/import]

I filed bug rdar://12373227 with Apple. This looks pretty serious. I confirmed other developers (not just Corona) have the same problem. It looks tied to ‘true’ audio interruptions (Apple’s definition) and OpenAL.

Everybody should file a duplicate bug with Apple ASAP on this to raise the priority. Simply refer to rdar://12373227 and say you use Corona and are affected by this bug.
For those curious, I mirrored my bug at Open Radar:
http://openradar.appspot.com/radar?id=2055401
[import]uid: 7563 topic_id: 31242 reply_id: 125471[/import]

i also got the same problem and im building with the stable release of corona, not the daily build.

please keep us notified on the bug report [import]uid: 17701 topic_id: 31242 reply_id: 125761[/import]

I filed bug rdar://12373227 with Apple. This looks pretty serious. I confirmed other developers (not just Corona) have the same problem. It looks tied to ‘true’ audio interruptions (Apple’s definition) and OpenAL.

Everybody should file a duplicate bug with Apple ASAP on this to raise the priority. Simply refer to rdar://12373227 and say you use Corona and are affected by this bug.
For those curious, I mirrored my bug at Open Radar:
http://openradar.appspot.com/radar?id=2055401
[import]uid: 7563 topic_id: 31242 reply_id: 125471[/import]

Please get more people to file duplicates on this one. It is still not high enough priority.
[import]uid: 7563 topic_id: 31242 reply_id: 125779[/import]

i also got the same problem and im building with the stable release of corona, not the daily build.

please keep us notified on the bug report [import]uid: 17701 topic_id: 31242 reply_id: 125761[/import]

Please get more people to file duplicates on this one. It is still not high enough priority.
[import]uid: 7563 topic_id: 31242 reply_id: 125779[/import]

I just filed a duplicate for this. It affects my app as well (of course, since we all use the same code base :slight_smile: [import]uid: 122310 topic_id: 31242 reply_id: 126293[/import]

I just filed a duplicate for this. It affects my app as well (of course, since we all use the same code base :slight_smile: [import]uid: 122310 topic_id: 31242 reply_id: 126293[/import]

I filed a bug report as well.

  • Andrew [import]uid: 109711 topic_id: 31242 reply_id: 126746[/import]

I filed a bug report as well.

  • Andrew [import]uid: 109711 topic_id: 31242 reply_id: 126746[/import]

I might have stumbled on a potential workaround.

This workaround really makes no sense, and may not actually work for your case, but I want to share this so you guys can start experimenting with different variations. Please share your results with others in the community.

Ultimately, we need everybody to file bug reports with Apple to make sure they fix the underlying problem.

Basically, I found changing the Audio Session category (mix mode) to Ambient at the start of the program seems to avoid the Siri problem on iPad 3. I don’t know how reliable this is for other interruptions (i.e. phone calls, alarms) and for other devices.

So putting something like this at the top of your main.lua might help (you may want to add an iOS 6 version check):

if audio.supportsSessionProperty then  
 audio.setSessionProperty(audio.MixMode, audio.AmbientMixMode)  
end  

You might try other audio session categories or try setting other things. I didn’t have any luck just changing the mixing setting:
audio.setSessionProperty(audio.OverrideMixWithOthers, 1)
which is supposed to essentially change the default SoloAmbientMixMode to AmbientMixMode. But as I said, this workaround doesn’t really make any logical sense and is just exploiting weird unknown implementation details in iOS 6.
Please understand that changing audio session properties is considered an “advanced” topic and you should read up and understand how these will alter the behavior of your app.
Our “documentation” can be found here:
http://developer.coronalabs.com/forum/2011/06/05/new-audiosession-properties
Also refer to Apple’s documentation on Audio Sessions.
So start experimenting and let everybody know your results.

[import]uid: 7563 topic_id: 31242 reply_id: 127232[/import]

I might have stumbled on a potential workaround.

This workaround really makes no sense, and may not actually work for your case, but I want to share this so you guys can start experimenting with different variations. Please share your results with others in the community.

Ultimately, we need everybody to file bug reports with Apple to make sure they fix the underlying problem.

Basically, I found changing the Audio Session category (mix mode) to Ambient at the start of the program seems to avoid the Siri problem on iPad 3. I don’t know how reliable this is for other interruptions (i.e. phone calls, alarms) and for other devices.

So putting something like this at the top of your main.lua might help (you may want to add an iOS 6 version check):

if audio.supportsSessionProperty then  
 audio.setSessionProperty(audio.MixMode, audio.AmbientMixMode)  
end  

You might try other audio session categories or try setting other things. I didn’t have any luck just changing the mixing setting:
audio.setSessionProperty(audio.OverrideMixWithOthers, 1)
which is supposed to essentially change the default SoloAmbientMixMode to AmbientMixMode. But as I said, this workaround doesn’t really make any logical sense and is just exploiting weird unknown implementation details in iOS 6.
Please understand that changing audio session properties is considered an “advanced” topic and you should read up and understand how these will alter the behavior of your app.
Our “documentation” can be found here:
http://developer.coronalabs.com/forum/2011/06/05/new-audiosession-properties
Also refer to Apple’s documentation on Audio Sessions.
So start experimenting and let everybody know your results.

[import]uid: 7563 topic_id: 31242 reply_id: 127232[/import]

Nope that solution is not working for me on the iphone 4S [import]uid: 88628 topic_id: 31242 reply_id: 129233[/import]

Nope that solution is not working for me on the iphone 4S [import]uid: 88628 topic_id: 31242 reply_id: 129233[/import]

hi Ernest i am facing the same problems. my audio channels have no volume after a phone call one iphone 4g whit iOS 6 and i check if the application was resumed ore not, whit the fallowing code

[lua]local function onSystemEvent( event )
print( "System event name and type: " … event.name, event.type )
if event.type==“applicationResume” then
audio.resume( gameMusicChannel )
end
end

Runtime:addEventListener( “system”, onSystemEvent )[/lua]
but stuck at this issue.
i am currently using corona 894 public build
dos some one know a solution? [import]uid: 169726 topic_id: 31242 reply_id: 130914[/import]