Help understanding AudioObjectPropertyListenerProc behaviour
Help understanding AudioObjectPropertyListenerProc behaviour
- Subject: Help understanding AudioObjectPropertyListenerProc behaviour
- From: paul <email@hidden>
- Date: Sun, 19 Aug 2012 18:51:38 +0100
I've just started working with Cocoa and CoreAudio specifically and would like to understand behaviour I am seeing with AudioObjectAddPropertyListener.
I've set up an AudioObjectPropertyListenerProc listener for the kAudioHardwarePropertyDefaultOutputDevice (amongst others) and generally it works as I'd expect - a change to the systems default device results in a call to my procedure.
On a test system I have a cheap, multi function USB device which has multiple mic inputs, optical out etc. When changing the default output device my procedure works as expected however when changing the default input device to, for example, the device's SPDIF interface my listener procedure is called several (three in fact) times with differing AudioObjectPropertyAddress selectors: defaultInput, defaultOutput and system output.
Whilst I think I understand the mechanism as described in the documentation for AudioObjectPropertyListenerProc, specifically that the procedure may be called with multiple addresses I'd like to understand why I'm seeing this behaviour with this particular device or type of devices. Without that extra bit of understanding my code has the slight air of a kludge about it.
Any pointers appreciated
|
_______________________________________________
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