activateAudioEngine(IOAudioEngine *, bool)
This is called to add a new IOAudioEngine object to the IOAudioDevice.
Declaration
virtual IOReturn activateAudioEngine(
IOAudioEngine *audioEngine,
boolshouldStartAudioEngine);Parameters
- audioEngine:
The IOAudioEngine instance to be activated.
- shouldStartAudioEngine:
If true, the audio engine is treated as a newly allocated IOAudioEngine instance and is appropriately attached and started according to IOKit convention. If it is false it is assumed that some other process (possibly the IOKit matching process) has started the IOAudioEngine and will skip that step.
Return Value
Returns true if the audio engine was successfully activated.
Overview
Once the IOAudioEngine has been activated by this function, it is ready to begin moving audio data. This should be called either during the subclass' initHardware() implementation for each IOAudioEngine the device creates. Or it should be called by the IOAudioEngine itself if the audio engine was automatically created by IOKit's matching process. The system won't be able to properly track and control IOAudioEngines if they are not activated though this function. This implementation will retain the IOAudioEngine while it maintains control of it. When the audio engine is deactivated, the IOAudioEngine will be released. If the IOAudioDevice subclass is passing a newly instantiated IOAudioEngine, it will need to release the audio engine after it has been activated. This will insure that the refCount on the audio engine is correct when it gets deactivated when the driver is stopped. That allows the audio engine to be freed when it is no longer needed.
See Also
Miscellaneous
activateAudioEngine(IOAudioEngine *)addTimerEventattachAudioPortaudioEngineStartingaudioEngineStoppedcompletePowerStateChangecompletePowerStateChangeActiondeactivateAllAudioEnginesdetachAllAudioPortsdispatchTimerEventsflushAudioControlsfreegetCommandGategetPendingPowerStategetPowerStategetWorkLoopinitinitHardwareinitiatePowerStateChangeperformPowerStateChangeprotectedCompletePowerStateChangeprotectedSetPowerStateremoveAllTimerEventsremoveTimerEventsetConfigurationApplicationBundlesetDeviceCanBeDefaultsetDeviceNamesetDeviceShortNamesetFamilyManagePowersetIdleAudioSleepTimesetManufacturerNamesetPowerStatesetPowerStateActionstartstoptimerFiredwaitForPendingPowerStateChange