• 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
MP Threads & Core Audio
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

MP Threads & Core Audio


  • Subject: MP Threads & Core Audio
  • From: Bob Stuller <email@hidden>
  • Date: Wed, 8 Aug 2007 15:36:49 -0400

Title: MP Threads & Core Audio
Folks, Greetings!
Nearly five years ago, Kelly Jacklin wrote the following & now I need to know how valid his remarks are in 2007:
(I am not speaking for the CoreAudio group, but I have an intimate understanding of the MP API implementation, have done a lot of synchronization work on OSX, and have worked extensively with CoreAudio APIs...)

You really do not want to use the MP API for this. MPNotifyQueue takes a global (to the process) lock, in order to ensure the rather bizarre termination semantics of the MP API. If this lock is held by any other thread, your thread will priority invert with this thread, and you will end up blocking until that thread has relinquished this lock. While this is not usually a long time, it can be longer, depending on the actions being performed by other threads in your app and the load on the system.

In fact, when you are operating on the IOProc (which SoundInput completions are), you want to do as few blocking operations as possible (ideally none).

I suggest you use the pthreads APIs directly
 ... snip .... (For the rest of this excellent, detailed entry: http://lists.apple.com/archives/Coreaudio-api/2002/Oct/msg00542.html)

You see, I've inherited a body of code, mostly working, that uses the MP API & wouldn't feel right doing a total rewrite without asking.  Thanks very much in advance.

Peace,
Bob
--

It's Great to be Green!
http://nlgreens.org/
 _______________________________________________
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: MP Threads & Core Audio
      • From: Herbie Robinson <email@hidden>
    • Re: MP Threads & Core Audio
      • From: kelly jacklin <email@hidden>
  • Prev by Date: Re: Coreaudio-api Digest, Vol 4, Issue 213
  • Next by Date: Re: MP Threads & Core Audio
  • Previous by thread: Re: Coreaudio-api Digest, Vol 4, Issue 213
  • Next by thread: Re: MP Threads & Core Audio
  • Index(es):
    • Date
    • Thread