IOS 5 problem? Help my App is waiting for review!

I have an App waiting for review that is based on the SimpleAudioRecorder sample App in your Corona Folder.

I just upgraded my iPhone 4 to IOS 5 and tried out my App on it and now I am facing a big issue. I also tried out a build of the SimpleAudioRecorder App and I have the same issue.

Basically, the first time through is okay. Hit record button and speak and it plays back. However, once you hit the button again there is such a lag it doesn’t show the next phase which is ‘stop recording’. The user will most likely hit the button again and basically turn off the recording and the game goes to play nothing. My game gets stuck on that phase now.

How can I get around this lag? Should I pull back my App?

Any help would be appreciated here. [import]uid: 22392 topic_id: 16398 reply_id: 316398[/import]

I can’t tell you how to fix the problem but I can tell you that you will need to pull the app.
Now that iOS5 is official there will be a lot of phones using this.
Once you get 1 star on your app, you can’t really go back.
Better to delay the launch and publish a quality app than trying to fixed a flawed app with future updates.
And, you will be less anxious once you pull it knowing that you now can work to fix it peacefully :slight_smile: [import]uid: 39031 topic_id: 16398 reply_id: 61200[/import]

Thanks for letting us know, it’s getting looked at. [import]uid: 52491 topic_id: 16398 reply_id: 61201[/import]

I am having a hard time reproducing this problem, though I have seen it once. if this worked fine in iOS 4, but has a problem in iOS 5, this is likely an Apple regression bug that Apple needs to know about. Please file a bug at https://bugreport.apple.com telling them what you know.

There was a problem back in 3.1 where switching between recording and playback modes took a really long time on devices. This was an Apple bug that got fixed in 3.2 or 4.0.

If this bug has returned, the problem was switching AudioSession modes (categories). One possible workaround is to change the audio session category to PlaybackAndRecord so no switching needs to take place.

http://developer.anscamobile.com/forum/2011/06/05/new-audiosession-properties
If this makes any difference, please let us know. And please file a bug with Apple.

[import]uid: 7563 topic_id: 16398 reply_id: 61203[/import]

Thanks for your help.
Carlos was nice enough to get back to me quickly and he confirmed this to be an Apple issue. [import]uid: 22392 topic_id: 16398 reply_id: 61207[/import]

By the way, you should not be having a hard time reproducing this issue.
Just build the SimpleAudioRecorder Sample Project from Corona’s Media folder in the sample code and you will see the lag on the second time you try to record. [import]uid: 22392 topic_id: 16398 reply_id: 61208[/import]

I tried that. I think the problem is that if this is a low level Core Audio bug, the physical hardware you have may actually make a difference. The 3.1 bug tended to be worse on older hardware which was unfortunate since they couldn’t be upgraded to 4.0.

[import]uid: 7563 topic_id: 16398 reply_id: 61225[/import]

I built the SimpleAudioRecorder sample and loaded it on an iPad2 and iPhone 3GS, both with iOS5. I also loaded it on an iPhone4 with iOS4.

The iPad2 and iPhone4 had no delay when recording and playing back. I did this about ten times on each device (while the app was still loaded).

On the 3GS the first time is fine but each time I press the Record button afterwards, there is about a four second pause before the Record button changes and the recording begins. There is no pause in playing back the audio after pressing Stop Recording. After restarting the app, the first time is fine and delayed when the recording is started the second time.

I can look at this a little more but Eric’s comment may be correct about it being an Apple bug that shows up on older hardware.

You should file a bug with Apple about this because it’s raises the odds that Apple will fix the bug. [import]uid: 7559 topic_id: 16398 reply_id: 63701[/import]

Everybody, we confirmed this is an Apple bug. Everybody should file a bug with Apple to escalate the priority of getting this fixed. In your bug reports, refer to Bug ID:9948362 and 10508829. This will let Apple more easily associate all the cases to count the number of people blocked by the issue.
[import]uid: 7563 topic_id: 16398 reply_id: 70902[/import]

We added a workaround to the sample code. Be aware that there are different negative implications with the workaround (limitations and performance implications with setting PlayAndRecord). You need to file a bug with Apple to get them to fix the real problem.

[import]uid: 7563 topic_id: 16398 reply_id: 71161[/import]

This workaround fixes the issue but makes all of my audio channels very quiet… So… still unusable. Do you have any feedback on how I might fix this? I tried setting the master and all channel volumes to 1 - no love. [import]uid: 54935 topic_id: 16398 reply_id: 83269[/import]

One of the bad side-effects of the workaround is that the small ear-speaker of the iPhone is used for output when PlaybackAndRecord is set. That is why this is only a workaround and not a fix. (File a bug report with Apple to get them to fix it.)

I presume Apple does this because when you do want to simultaneously record and playback, you want to avoid feedback noise so moving the speaker away from the microphone helps this.

Anyway, see this thread about using the backdoor I left to the Audio Session APIs to change the speaker route.

http://developer.anscamobile.com/forum/2011/06/05/new-audiosession-properties [import]uid: 7563 topic_id: 16398 reply_id: 83285[/import]

I can tell you that using the backdoor that Eric left to change the speaker route (very well explained in the other post, btw thanks again Eric) you can redirect the output to the main speaker.

Usually that shouldn’t be necessary, since if you’re recording you’re going to get feedback noise. However it was necessary and solved my problem (I’m making a funny “breathalyzer” test where the user blow in the microphone and a tube fills with some liquid… at the same time playing an audio clip with some water flowing when it detects the blow… it’s working perfectly) [import]uid: 9158 topic_id: 16398 reply_id: 83296[/import]

Well, I could not have expected a more prompt and useful reply. Everything is working smoothly now with the backdoor fix. Thank you both. [import]uid: 54935 topic_id: 16398 reply_id: 83299[/import]