iOS mic input latency
iOS mic input latency
- Subject: iOS mic input latency
- From: Beinan Li <email@hidden>
- Date: Tue, 21 May 2013 17:04:51 -0400
Hello CoreAudio,
I'm running a test to measure the basic latency of my iPhone app, and the result was disappointing: 50ms for a play-through test app. The app just picks up mic input and plays it out using the same render callback, no other audio units or processing involved. Therefore, the results seemed too bad for such a basic scenario. I need some pointers to see if the result makes sense or I had design flaws in my test.
The basic idea of the test was to have three roles:
- My finger snap as the reference sound source.
- A simple iOS play-thru app (using built-in mic) as the first listener to #1.
-
A Mac (with a USB mic and Audacity) as the second listener to #1 and the only listener to the iOS output (through a speaker connected via iOS headphone jack).
Then, with Audacity in recording mode, the #3 would pick up both the sound from my fingers and its "clone" from the iOS speaker in close range. Finally I simply observe the visual waveform in Audacity's recorded track and measure the time distance between the peaks of the two recorded snaps.
This was by no means a super accurate measurement, but at least the innate latency of the Mac recording pipeline should have been cancelled out this way. So that the error should mainly come from the peak distance measurement, which I assume should be much smaller than the Mac latency would have caused.
I was expecting 20ms or lower latency, but clearly the result gave me 50~60ms.
My ASBD uses kAudioFormatFlagsCanonical and kAudioFormatLinearPCM as format.
Thanks,
Beinan
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden