Re: Update Cocoa object from callback
Re: Update Cocoa object from callback
- Subject: Re: Update Cocoa object from callback
- From: Chris Reed <email@hidden>
- Date: Thu, 29 May 2003 14:34:16 -0500
so like every 46 ms, or about 21.5 times a second.
I don't know, that doesn't sound too bad. But the thing I'd be most
concerned about is if performSelectorOnMainThread: is blocking or not
since you're calling it from your IOProc.
Another thing to consider is how much work you do per buffer. Can your
work thread (the main thread in your case) get behind if the system
load increases (because the main/work thread is running at a normal
thread priority).
If you are doing non-GUI type of work, can you move that into a
separate thread?
On the other hand, if you've already implemented it and it works for
you without any problems, go for it.
-chris
On Wednesday, May 28, 2003, at 15:08 US/Central, john wrote:
Hi Chris,
I am using it from the IOProcs in my app, and the audio device is
set-up for 2048 samples I think. It needs to do many things as a
result of the IOProcs coming through, so seeing that on the list I
thought it'd be quick improvement to offload the work to the main
thread. It's called at least once through the IOProcs, on occasion
twice.
-- John
How frequently?
I don't know about the overhead of performSelectorOnMainThread:, but
if you're doing it _really_ frequently (hundreds of times a second? i
don't know..) you should maybe consider using a more direct method of
inter-thread communication, imho.
-chris
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.