Re: How to detect Audio device add and remove
Re: How to detect Audio device add and remove
- Subject: Re: How to detect Audio device add and remove
- From: Jeff Moore <email@hidden>
- Date: Fri, 20 Jun 2003 17:07:19 -0700
The HAL provides this information to you in the form of
kAudioHardwarePropertyDevices. You use AudioHardwareGetProperty() to
get the value of this property which is an array of AudioDeviceIDs for
the devices currently attached to the system. To find out when devices
come and go, you also need to add a property listener routine to
kAudioHardwarePropertyDevices via AudioHardwareAddPropertyListener().
This routine will get called when the value of
kAudioHardwarePropertyDevices changes.
If you already want to know when a particular device is removed from
the system, you get it's AudioDeviceID and add a property listener to
kAudioDevicePropertyDeviceIsAlive via AudioDeviceAddPropertyListener().
The sample code in /Developer/Examples/CoreAudio/HAL/Daisy shows how
this works.
On Thursday, June 19, 2003, at 2:05 PM, Nobuyasu Jinnai/神内伸恭 wrote:
Dir sir,
I must detect Audio device plugged or unplugged.
How can I do that?
# I am very sorry for anytime I ask questions.
Best regards,
--Jinnai
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.
--
Jeff Moore
Core Audio
Apple
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.