Re: atexit and kAudioDevicePropertyDeviceIsRunning problem
Re: atexit and kAudioDevicePropertyDeviceIsRunning problem
- Subject: Re: atexit and kAudioDevicePropertyDeviceIsRunning problem
- From: email@hidden
- Date: Fri, 28 Apr 2006 08:17:40 +0200
Jeff Moore writes:
kAudioDevicePropertyDeviceIsRunning has never indicated whether or not
the HAL is calling IOProcs. It is there to say whether or not the IO
thread itself is running in the process. It is a common and legal case
that the IO thread is running even though no IOProcs are being called.
Reading through the documentation again I already feared that this might be
the case. Is it possible to check, IF the IO thread is still calling the
IOProcs?
Finally, I'd be a bit worried about using an atexit handler for this job.
The reason why is that the HAL is also using an atexit handler to clean
itself up. This means that the order of execution of your handler and the
HAL's is going to depend on the order in which the handlers are
registered.
The problem here is that libao is just a library. Adplay for example uses
this library and also cleans everything up in an atexit call when shutting
down. Other programs like uade work fine since the do not use atexit. The
problem is that people using the library might use atexit or not and they
want libao to behave like on every other platform.
If there is no other way I'll just shutdown everything without waiting for
the buffers to be emptied. Since HAL is also stopping the ioprocs is it a
problem if this is done twice? First by me and then by the HAL or the other
way around.
Kind regards,
Michael
_______________________________________________
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