Re: AudioDeviceStop and ioProc
Re: AudioDeviceStop and ioProc
- Subject: Re: AudioDeviceStop and ioProc
- From: Jeff Moore <email@hidden>
- Date: Fri, 12 May 2006 11:40:45 -0700
On May 11, 2006, at 6:18 PM, Tim Dorcey wrote:
Let me say this clearly so that there is no misconception: The only
way to get guaranteed behavior from AudioDeviceStop() is to call it
on the IO thread. The guarantee that is given is twofold. First, the
IOProc being stopped will never get called until Start() is called
again. Second, any output data supplied in that final call to the
IOProc will get sent to the hardware.
Thanks for clearing this up. I see that you are thinking of an output
device. I assume the same holds true for an input device that is
feeding
data to me in the ioProc.
It goes without saying that the input data you receive in that final
call will be valid. After all, the HAL doesn't know that any given
call out to an IOProc will be the final call when it is being made.
So, it sounds like the best way to terminate audio capture is to
just have
my ioProc call AudioDeviceStop for itself. Easy enough. For some
reason, I
was under the impression that it would not be safe to call
AudioDeviceStop
from within the ioProc.
This is indeed the best way to stop. In fact, this is exactly how
AUHAL deals with stopping.
--
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