Re: HAL IO thread priority and glitching
Re: HAL IO thread priority and glitching
- Subject: Re: HAL IO thread priority and glitching
- From: "Stephen F. Booth" <email@hidden>
- Date: Wed, 18 Sep 2013 22:10:33 -0400
I'll recheck my IOProc but the code is C++ so I'm definitely not calling Objective-C; I also don't make any CF calls. The fact that I was able to recreate the issue in a vanilla Cocoa app using only AudioFilePlayer and AUHAL (and thus without any IOProcs of my own) made me wonder if my IOProc was really to blame. I'll mess around with Instruments as well as file a bug and send you the # off list.
Stephen
On Wednesday, September 18, 2013 at 9:29 PM, Jeff Moore wrote:
Without any actual evidence, it is nearly impossible to say what is happening. Please file a bug.
That said, I know you say you aren't doing anything that blocks inside your IOProc. But there are lots of things in the system that you can call that will block. The most common problem I've seen is an making ObjC method invocations on the IO thread. ObjC is a wonderful application level tool, but it is most definitely not real time safe. There are code paths in the method dispatcher that block for unbounded amounts of time. So, we recommend that your app stay away from making any ObjC calls inside the IOProc. Note that this goes for using most CoreFoundation objects as well given that a good many of them are directly implemented in ObjC.
So, I encourage you to do a through scrub to ensure that you are not doing any of that.
Finally, while the IO thread is a real time thread, it can still be held off by other high priority work on the system. Off the top of my head, the most likely scenario here is that there is some kind of VM fault happening. Note that you can use a System Trace in Instruments to track down what is going on on the IO thread.
—
Jeff Moore
Core Audio
Apple
_______________________________________________
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