• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: audio priority and multitasking on iOS
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: audio priority and multitasking on iOS


  • Subject: Re: audio priority and multitasking on iOS
  • From: Zachary Kulis <email@hidden>
  • Date: Mon, 29 Nov 2010 15:23:31 -0500

Hi Niels,

Please see my earlier post "RemoteIO - missed deadline - incorrect timestamps". I have also noticed this behavior, and my conclusion is that if you perform any file I/O while running the RemoteIO audio unit, you may experience occasional missed callbacks (regardless of the thread in which the file I/O is performed). One thing you can do is to lower the priority of any thread that performs file I/O while the RemoteIO is active. NSThread provides a nice API for setting the thread priority; for POSIX threads (i.e., pthreads), you can use the pthread_setschedparam API.

If you do any hardware decoding, you may also experience occasional lags from the hardware decoder when performing file I/O. There definitely seems to be some interplay/coupling among the RemoteIO, file I/O, and hardware decoding in the OS -- at least this is what I've observed.

Also, it may be a better approach to move your DSP processing out of the RemoteIO callback. I've observed that if you spend longer than about 1 ms in the callback, you may experience static/cracking on the input (if recording) or stuttering on the output. I'm not sure about missed callbacks, but definitely heed Apple's recommendation about spending as little time as possible in the RemoteIO callback.

-Zach
Hi,

I use RemoteIO to playback sound on the iPhone. What I noticed recently, is that I get dropouts when my app is in the foreground, but other apps run in the background. I was assuming that the coreaudio remoteio thread was about the highest priority on iOS, and that playback of audio would be safe, regardless of other apps' activity. Is that true, or is there some way to renice it to become even higher priority?

 _______________________________________________
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

References: 
 >audio priority and multitasking on iOS (From: Niels Bogaards <email@hidden>)

  • Prev by Date: Re: audio priority and multitasking on iOS
  • Next by Date: Running auval makes AUGraphOpen() return -50?
  • Previous by thread: Re: audio priority and multitasking on iOS
  • Next by thread: Re: audio priority and multitasking on iOS
  • Index(es):
    • Date
    • Thread