• 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
Re: What starves audio playback?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: What starves audio playback?


  • Subject: Re: What starves audio playback?
  • From: Jeff Moore <email@hidden>
  • Date: Tue, 11 Jan 2005 15:56:17 -0800

It's probably not Core Audio per se that is getting starved. The HAL uses a real time thread to call IOProcs. The only thing that can hold off this thread is other real time threads, VM activity and primary interrupts.

The most likely culprit is one of two things. First, the thread getting starved could be the thread that is responsible for feeding data to the IO thread. Normally, you'd make a feeder thread be a closer-to-normal priority thread. As such, going CPU bound in another normal thread can hold off the feeder depending on their relative priorities.

The other possibility is that you have some code in your IOProc that blocks. This could come about because you have a mutex that you lock in your IOProc that might be already locked by another thread or some other similar construct where the code in your IOProc has some dependancy on work getting done on another thread.

To figure out what's going on, you can put some code in your IOProc that makes rough estimates about when it should get called and then printf or drop into the debugger when it misses that time. That should give you some pretty good clues about what is going on that is causing your glitches.

On Jan 10, 2005, at 9:51 PM, David M.Cotter wrote:

in my app, i've heard tell of audio dropping out when doing a search. admittedly, the search is very CPU intensive, and doesn't get back to the event loop for perhaps a long while.

I was under the impression that using CoreAudio put audio playing on a preemptive thread, so I don't need to MPYield(), or YieldToAnyThread() or even run my event loop in a timely manner. am I off the mark here? how can I give CPU time to CoreAdudio when I'm in the middle of a big crunch? I don't think I want to call EventAvail(nullEvtMask, ...)

--

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
References: 
 >What starves audio playback? (From: "David M.Cotter" <email@hidden>)

  • Prev by Date: Core Audio Question for VIOP application.
  • Next by Date: Re: CPU limit for RT audio thread?
  • Previous by thread: What starves audio playback?
  • Next by thread: CPU limit for RT audio thread?
  • Index(es):
    • Date
    • Thread