Delay when using audio recording

I’m not sure if this started happening with iOS5 or the newer SDK versions, but there’s a 2-3 second delay when starting audio recordings. The whole app becomes unresponsive for a couple of seconds and then the recording starts. The sample SimpleAudioRecorder app displays this behavior. [import]uid: 61552 topic_id: 17787 reply_id: 317787[/import]

Would you be able to file a bug report and include all the information you have? (iOS version, SDK version, if you’ve modified the sample project at all, etc.)

Would be very helpful to us.

Thanks,

Peach :slight_smile: [import]uid: 52491 topic_id: 17787 reply_id: 67881[/import]

Did this problem got resolved as I am in desperate need of audio recording functionality ?
Moreover when I am using this record functionality,my audio file saves it as long as i am running the application but when I exit the application it doesn’t retains the audio file and I need to save the audio file again .Is there a coding error or a bug in corona as i have posted the same problem few weeks ago but did not get any response? Please help me out…Pleasee… [import]uid: 82446 topic_id: 17787 reply_id: 69320[/import]

I just did a test using build .689 and there does not appear to be any lag.

Of course, daily builds and their fixes are only available to subscribers.

For saving, see here; http://developer.anscamobile.com/content/multimedia-features#recording_media.newRecording_file_

You can also take a look at this thread which suggests a solid workaround; http://developer.anscamobile.com/forum/2011/07/18/save-audio-ipodmusic-library

Peach :slight_smile: [import]uid: 52491 topic_id: 17787 reply_id: 69330[/import]

I cannot install it when I am building it with build .689 or build .691 …Can you tell me why can’t I install it in my ipad.But there was no error while building it… [import]uid: 82446 topic_id: 17787 reply_id: 69339[/import]

Rahul, do you have a subscriber account?

How are you trying to add it to your iPad? [import]uid: 52491 topic_id: 17787 reply_id: 69532[/import]

As I have said you I work under a company.So they have a subscription.And I am using it as i am the Software developer for mobile application for this company. [import]uid: 82446 topic_id: 17787 reply_id: 69536[/import]

You didn’t answer my question about adding it to the iPad. Have you tried adding it via Xcode? [import]uid: 52491 topic_id: 17787 reply_id: 69540[/import]

No,I haven’t tried using xcode.To be very frank I have never used xcode.So I dont have any idea about xcode.Could you tell me how to do that with xcode? [import]uid: 82446 topic_id: 17787 reply_id: 69542[/import]

Plug your device into the computer via usb, then open Xcode and press CMD+Shift+2 to open the Organizer window.

Click your device on the left and if there is a button to the right saying something along the lines of “Allow for development”, click that.

Give it a minute to gather information about the device, iOS, etc.

Then take the app that Corona built and drag and drop it over your device in the list to the left and it will add it.

Peach :slight_smile:

[import]uid: 52491 topic_id: 17787 reply_id: 69633[/import]

Hi Peach:

I’ve just reproduced the 2-3 second delay with the latest build (701) and the most recent public build of the SDK. I think the problem was introduced with IOS5 and not the SDK. Our app, SparkleFish, has worked fine since May 2011. When I install SparkleFish from the App Store onto my iPhone 4, I get the delay when recording sounds. There is much less of a delay on the iPad 2. I believe that is due to its faster processor. I would imagine the delay wouldn’t really be noticeable on the iPhone 4S as well, but I haven’t tested it. To be clear though, we tested SparkleFish on iPhone 3G and 3GS when we launched in May and there was no noticeable delay.

To reproduce it, you can just create a new recording and then call startRecording. The delay happens on startRecording. The weird thing is that once in a while you won’t see a delay. I would say that I typically see it 8 out of 10 times I try recording.

Note that there is no delay in the Corona simulator. However, I was able to see the delay in the iPhone sim and on the device.

I’m wondering if something was introduced in iOS5 that you guys now need to look into. Perhaps the startRecording API needs to be tweaked?

You can create the delay using the snippet from the API manual page:

[lua]local filePath = system.pathForFile( dataFileName, system.DocumentsDirectory )
r = media.newRecording( filePath)
r:startRecording( )[/lua]

Since SparkleFish is all about recording, this pretty much kills our user experience.

Is this something you guys can look into? Please help! :slight_smile:

Thanks,
Paul Osburn [import]uid: 7101 topic_id: 17787 reply_id: 71697[/import]

Ansca has said this is an Apple bug and want everyone to file a bug report with Apple.
Please file a bug report so it can be fixed.

Please see this thread for more info:
https://developer.anscamobile.com/forum/2011/10/14/ios-5-problem-help-my-app-waiting-review [import]uid: 22392 topic_id: 17787 reply_id: 74712[/import]

Thanks ChunkyApps.

I ended up creating another thread and got some help from Ansca. I submitted a bug to Apple and was also able to use the workaround they suggested.

Delay when using StartRecording API
[import]uid: 7101 topic_id: 17787 reply_id: 74800[/import]

Hey guys, thanks for updating the thread; sometimes some get overlooked.

Most appreciated!
Peach :slight_smile: [import]uid: 52491 topic_id: 17787 reply_id: 74827[/import]