Re: kAudioHardwareUnsupportedOperationError after calling AudioDeviceStop/AudioDeviceRemoveIOProc from atexit
Re: kAudioHardwareUnsupportedOperationError after calling AudioDeviceStop/AudioDeviceRemoveIOProc from atexit
- Subject: Re: kAudioHardwareUnsupportedOperationError after calling AudioDeviceStop/AudioDeviceRemoveIOProc from atexit
- From: Jeff Moore <email@hidden>
- Date: Thu, 17 Nov 2005 11:41:48 -0800
The HAL installs an atexit handler in order to tear itself down.
Applications will get kAudioHardwareUnsupportedOperationError and
other assorted errors if an API call is attempted while the HAL's
atexit handler is running or if it has already run.
You don't have to worry about telling the HAL to stop the hardware or
unregister any IOProcs or listeners. This is taken care of as part of
the HAL's tear down process.
On Nov 17, 2005, at 5:25 AM, Mike Kronenberg wrote:
I'm writing the coreaudio sound output for the CPU emulator QEMU.
The coreaudio module is working fine until QEMU is closed and the
functions of atexit get executed.
I have functions to stop audio and to remove the IOProc.
These function can be called during emulation, when the emulator
gets paused or stopped.
They work as expected and return no error.
If the same functions get called on cleanup from atexit() I get
kAudioHardwareUnsupportedOperationError.
I double checked that the AudioDeviceID is still present and correct.
I found postings on the list
http://lists.apple.com/archives/coreaudio-api/2003/Oct/msg00279.html
http://lists.apple.com/archives/Coreaudio-api/2001/Jun/msg00052.html
suggesting that the IOProc hasn't been registered with the device
(yet) - which can't be, since it's functioning alright when called
elsewhere.
Is it possible that the IOProc gets unregistered before by the
system without notice? How can I be sure that it's been cleanly
removed?
--
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