Re: atexit and kAudioDevicePropertyDeviceIsRunning problem
Re: atexit and kAudioDevicePropertyDeviceIsRunning problem
- Subject: Re: atexit and kAudioDevicePropertyDeviceIsRunning problem
- From: Michael Guntsche <email@hidden>
- Date: Fri, 28 Apr 2006 20:54:00 +0200
On Apr 28, 2006, at 20:33, Jeff Moore wrote:
If one is using atexit(), one has to be cognizant that a lot of
services are going to be in an indeterminate state.
Well what I mean is that libao itself is NOT using atexit on close
but another application might use libaos close function in an atexit
() and I have to take that into account. Right now I have two
applications running here using libao (uade and adplay). While uade
just calls the close function at the end, adplay calls it in an atexit
(). So uade just stops while adplay hangs on shutdown.
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.
As long as you are prepared for possibly getting errors from the
HAL since the HAL may have already unloaded itself by the time you
get to run.
My idea is to just teardown the audio unit ignoring any errors. It is
not the most cleanest way but the worst case that can happen is that
I try to close an audiounit that IS already closed.
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