Re: AudioOuputUnitStop
Re: AudioOuputUnitStop
- Subject: Re: AudioOuputUnitStop
- From: Bjorn Roche <email@hidden>
- Date: Thu, 8 Dec 2005 10:35:05 -0500 (EST)
On Tue, 6 Dec 2005, Jeff Moore wrote:
From the HAL's perspective, AudioDeviceStop() has no guarantees unless it is
called on the IO thread (that is, from inside of a call out to an IOProc).
There could be any number of calls out to IOProcs between when the call to
AudioDeviceStop() returns and when the the thread actually terminates. It's
generally small, but it is definitely not guaranteed as the operation is
totally asynchronous. The only guarantee is that the HAL will send a
notification for the property kAudioDevicePropertyDeviceIsRunning when things
are totally done. (Note that in a process with many unrelated HAL clients,
it's easy to get into a situation where calling AudioDeviceStop() only stops
the IOProc in question and doesn't actually send a
kAudioDevicePropertyDeviceIsRunning notification when other clients in the
process are still doing IO.)
When AudioDeviceStop() is called on the IO thread, things are different. The
HAL will not call the IOProc that was stopped again after the
AudioDeviceStop() call completes, but the buffer provided by that IOProc will
get played (and nothing after that from that IOProc).
AudioOutputUnitStop() has the same general behavior as AudioDeviceStop(). The
difference is that when AudioOutputUnitStop() is called from outside the IO
thread, the call blocks until the HAL actually stops things.
AudioOutputUnitStop() does not block when made from the IO thread.
Super! Thanks Jeff,
bjorn
-------------
Bjorn Roche
Check out my CD Mastering Software
for Mac OS X : http://www.xowave.com
_______________________________________________
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