• 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: Sync question about CoreAudio and DCL program callback
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Sync question about CoreAudio and DCL program callback


  • Subject: Re: Sync question about CoreAudio and DCL program callback
  • From: Jeff Moore <email@hidden>
  • Date: Mon, 19 Jan 2009 09:53:37 -0800

It is almost certainly the case that IOAudioEngine::clipOutputSamples() will not run on the same thread or work loop as your DCL callbacks. The reason why is that IOAudioEngine::clipOutputSamples() is called from the IOAudio kernel trap which executes on the HAL's IO thread.

The IOAudio family already locks around accessing the buffers. In fact, IOAudioEngine::clipOutputSamples() is called while holding those locks. So you may not need to add any additional locking, provided you set up your re-entrancy to take advantage of that.


On Jan 19, 2009, at 1:02 AM, David Tan wrote:

I’m working on a FireWire audio driver and got a critical question about the sync of IOAudioEngine::clipOutputSamples() and DCL program Callback.
What I want to do is to copy audio data from CoreAudio buffer to the output buffer of DCL program. But I’m not sure if clipOutputSamples() and DCL program callback will run in the same workloop.
Because if they run in different threads, I have to put a semaphore or something like this to protect the buffer access from two threads, One of which is writing in clipOutputSamples(), and the other is reading in DCL program callback. And if we have to do this, I wonder if there’s any good way you can recommend.
 
Any experience of advice will be much appreciated! Thanks a lot!



-- 

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: 
 >Sync question about CoreAudio and DCL program callback (From: "David Tan" <email@hidden>)

  • Prev by Date: AURemoteIO asbd format don't work with ExtAudioFile
  • Next by Date: Re: setting the property of peak limiter
  • Previous by thread: Sync question about CoreAudio and DCL program callback
  • Next by thread: Re: Sync question about CoreAudio and DCL program callback
  • Index(es):
    • Date
    • Thread