missing the first IOAudioSelectorControl notification?
missing the first IOAudioSelectorControl notification?
- Subject: missing the first IOAudioSelectorControl notification?
- From: Brett George <email@hidden>
- Date: Fri, 25 Jan 2008 10:29:51 -0800
In have a kext which creates an IOAudioSelectorControl in its
initialisation:
{
// initialisation code...
m_pOutputSourceSelector =
IOAudioSelectorControl::createOutputSelector(0,kIOAudioControlChannelIDAll,
kIOAudioControlChannelNameAll, 0);
if ( m_pOutputSourceSelector )
{
// Add source names
for (n=0; n<2; n++)
m_pOutputSourceSelector->addAvailableSelection(n, apszSourceNames[n]);
m_pOutputSourceSelector->setValueChangeHandler((IOAudioControl::IntValueChangeHandler)MyAudioEngine::SourceOutputChangeHandler,
this);
addDefaultAudioControl(m_pOutputSourceSelector);
}
}
// Source Change handler
IOReturn MyAudioEngine::SourceOutputChangeHandler(IOService* pTarget,
IOAudioControl* pControl, SInt32 oldValue, SInt32 newValue)
{
IOLog("SourceOutputChangeHandler (%p) changed value to %d\n",
pControl, (int) newValue);
// change handling code...
}
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.
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?
Thanks,
Brett.
_______________________________________________
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