Re: AudioDeviceStop
Re: AudioDeviceStop
- Subject: Re: AudioDeviceStop
- From: Jeff Moore <email@hidden>
- Date: Fri, 31 Aug 2001 11:50:09 -0700
on 8/31/01 5:19 AM, Benjamin Golinvaux <email@hidden> wrote:
>
I would like to know if AudioDeviceStop returns immediatly or
>
if it waits for the corresponding IO proc to finish ?
>
>
If it returns immediatly, I need to retrieve the pthread id
>
of the IO proc and use pthread_join to wait for the thread
>
to finish to avoid access to already deleted resources.
>
>
I could not find this information neither in coreaudio.pdf
>
nor in the header files.
In general, it isn't safe to make the assumption that you are the only
client of a device in a given process. So, it doesn't really matter if
AudioDeviceStop is synchronous or asynchronous.
You should use the state and the notification provided for the device
property, kAudioDevicePropertyDeviceIsRunning, for determining whether or
not the IO thread for a given device is running.
--
Jeff Moore
Core Audio
Apple