• 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
Time Problem with NSThread
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Time Problem with NSThread


  • Subject: Time Problem with NSThread
  • From: Wayne Anderson <email@hidden>
  • Date: Fri, 30 Dec 2005 12:25:19 -0700

Hello,

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.

Any suggestions would be appreciated,


Wayne Anderson



__________________________________

Wayne Anderson

Red Rock Software, Inc.

10 West Broadway, Suite 850

Salt Lake City, UT  84101

http://www.redrocksw.com

office: 801.322.4322 ext: 106


 _______________________________________________
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

  • Follow-Ups:
    • Re: Time Problem with NSThread
      • From: Jeff Moore <email@hidden>
  • Prev by Date: Re: AudioUnit FormatConverter
  • Next by Date: Re: Time Problem with NSThread
  • Previous by thread: Re: AudioConverterConvertBuffer
  • Next by thread: Re: Time Problem with NSThread
  • Index(es):
    • Date
    • Thread