• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
missing the first IOAudioSelectorControl notification?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: missing the first IOAudioSelectorControl notification?
      • From: Jeff Moore <email@hidden>
  • Prev by Date: Re: parsing SMPTE LTC code
  • Next by Date: Re: AU's new prioritized MIDI specification
  • Previous by thread: Re: AU's new prioritized MIDI specification
  • Next by thread: Re: missing the first IOAudioSelectorControl notification?
  • Index(es):
    • Date
    • Thread