2

I noticed there are audible sound gaps with audio units rendering when something heavy happens on UI main thread, for instance, first show of UIAlertView or some heavy ui controller.

Please take a look at the sample project. There is only one remote IO unit with output render callback, buffer duration is set to maximum possible - 92ms. When loading alert view, there is 200-300ms gap between render callbacks, even if render function is empty.

The question is: how do I reach Apple's MPMusicPlayerController rendering performance with Audio Units? Is that even possible or Apple's player is based on lower API? Looking through core-audio mailing lists got me nowhere.

Thanks in advance!

Roman B.
  • 3,598
  • 1
  • 25
  • 21
  • Check for some other bug. The RemoteIO Audio Unit already runs in a separate higher priority thread than the UI run loop, and thus should not be affected that much unless you do something in the callback. – hotpaw2 Dec 10 '12 at 20:23
  • Thanks for the answer! But how about how about the captured value? When glitch happens, it passes more than 200ms between render callbacks, it would have to pool 4096*3 frames before the lag. Seems like audio thread priority is not high enough. Any ideas? – Roman B. Dec 11 '12 at 00:43
  • any luck with this ? think I'm facing a similar issue where my circular buffer code isn't being called when a UI event happens. Not entirely sure if it is but like yours I'm hearing glitches in the audio stream – Simon McLoughlin Jan 04 '13 at 13:53
  • Nope, nothing new. I'll wait for Michael Tyson's the Amazing Audio Engine release, maybe he comes up with some solution. – Roman B. Jan 06 '13 at 22:17
  • Hi, guys! i had the same issue in my project. It was because of using AVAssetReader's `status` property in my filling buffer operation. I worked with time profiler and checking `status` was very expensive operation. I cut it off my operation and there are no sound gaps anymore. So you should check your own functions. Render callback works as fast as it should. – Anton K Apr 07 '14 at 03:50
  • Hello?, Any luck on this I am facing the same issue but my problem is I am streaming the audio and render call back is take time to call, It will give high priority to UI so glitches are there. – Bhavesh Lathigara Jul 02 '15 at 15:49

0 Answers0