Contents

init

Initializes a newly allocated IOAudioControl with the given attributes.

Declaration

virtual bool init(
 UInt32 type, 
 OSObject *initialValue, 
 UInt32 channelID, 
 const char *channelName = 0, 
 UInt32 cntrlID = 0, 
 UInt32 subType = 0, 
 UInt32 usage = 0, 
 OSDictionary *properties = 0);

Parameters

  • type:

    The type of the control. Common, known types are defined in IOAudioTypes.h. They currently consist of kIOAudioControlTypeLevel, kIOAudioControlTypeToggle, kIOAudioControlTypeSelector.

  • channelID:

    The ID of the channel(s) that the control acts on. Common IDs are located in IOAudioTypes.h.

  • channelName:

    An optional name for the channel. Common names are located in IOAudioDefines.h. Any name not defined in IOAudioDefines.h must be localized in order to be properly displayed in multiple languages.

  • cntrlID:

    An optional ID for the control that can be used to uniquely identify controls

  • subType:

    An optional subType specific to the given type

  • usage:

    An optional value specifying how the control will be used. Currently defined usages are kIOAudioControlUsageInput, kIOAudioControlUsageOutput and kIOAudioControlUsagePassThru. This value is used when a control is set as a default control on an IOAudioEngine.

  • properties:

    Standard property list passed to the init() function of any new IOService. This dictionary gets stored in the registry entry for this instance.

Return Value

Returns true on success.

See Also

Miscellaneous