Re: missing the first IOAudioSelectorControl notification?
Re: missing the first IOAudioSelectorControl notification?
- Subject: Re: missing the first IOAudioSelectorControl notification?
- From: Jeff Moore <email@hidden>
- Date: Fri, 25 Jan 2008 12:17:57 -0800
On Jan 25, 2008, at 10:29 AM, Brett George wrote:
I receive the notification when the user changes the control in AMS
and everything usually works great. The trouble is that when the
driver is first loaded (either manually, or after install and
reboot), the value of the source parameter is recalled (presumably
from the CoreAudio daemon), but I do not get a notification that
this change has occured.
Yes. When coreaudiod first launches, it will blast back the values for
your controls that it saved the last time the daemon shut down.
So on startup, the driver is out of sync with the value of the
controls. If I toggle the control, everything works as expected.
Am I doing something incorrectly to not receive this first
notification, or is there another way I can recall this "default"
state?
From my reading of the IOAudio family's IOAudioControl code, when the
HAL sets a value on your control, it ends up calling
IOAudioControl::setProperties which ultimately calls
IOAudioControl::setValue(OSObject*). The main area I can see that
might cause trouble is if IOAudioControl::validateValue() returned an
error or the value member of your IOAudioControl object is somehow
already set to the value that is coming in or is NULL or something
like that.
--
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