Re: Time Problem with NSThread
Re: Time Problem with NSThread
- Subject: Re: Time Problem with NSThread
- From: Jeff Moore <email@hidden>
- Date: Fri, 30 Dec 2005 12:42:07 -0800
This sounds like your work thread is getting out competed by other
threads on the system. What priority are you giving it?
On Dec 30, 2005, at 11:25 AM, Wayne Anderson wrote:
Our app currently is using an NSThread to run a timing loop that
gets events from a Music Sequence. These events are then passed on
to an internal processor that fills an internal buffer with
samples. The Core Audio render thread then draws from this buffer
on each render call. This scheme works fine on a dual processor G5
but on a 1.67 MHz PowerBook our internal NSThread occasionally gets
blocked for a very long time (long in computer terms at least) on
the order of 100 milliseconds. The block always seems to coincide
with the Core Audio render thread grabbing processor time. The
only thing we are doing on the render thread is calling memcpy to
move data to the supplied ABL. Setting the priority on the
NSThread seems to make no difference.
Is this kind of long blocking behavior normal?
Should we resort to a posix thread, or should we make use of ring
buffers or some other construct to process our events ahead of time
to make the app insensitive to this kind of thread timing jitter.
--
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