Registering a property listener from a daemon process
Registering a property listener from a daemon process
- Subject: Registering a property listener from a daemon process
- From: Michael Babin <email@hidden>
- Date: Mon, 31 Jan 2011 10:28:02 -0600
I'm working on a set of applications and plugins for a client, some that run from a daemon and some that run in a user session. The software includes an audio driver and a component that runs under a daemon process which communicates with the audio driver. The component adds a property listener to several properties of the device (AudioDeviceAddPropertyListener) and to several properties of the hardware (AudioHardwareAddPropertyListener).
One of the hardware properties it listens to is kAudioHardwarePropertyDefaultOutputDevice, to observe when the default output device is changed (directly by the user or otherwise). In testing, I have observed that the listenerProc is not being called when the user switches the output device (through System Preferences, Sound panel). I have observed the listenerProc being called when I logged in as root and switched the output device in the same way.
I'm guessing that registering as a listener for this property from a daemon (system process) is my problem, and that I need to register from a user level process to receive a notification when the user changes the output device. Can anyone confirm if this assumption is or is not correct?
Also, if this assumption is indeed correct, is it documented anywhere which properties are applicable at the user level and which at the system level? For example, I might suppose that registering as a listener for kAudioHardwarePropertyDevices from a daemon process would yield a callback when a new device is added?
_______________________________________________
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