Contents

withAttributes

Static function that allocates a new IOAudioControl with the given attributes.

Declaration

static IOAudioControl *withAttributes(
 UInt32 type, 
 OSObject *initialValue, 
 UInt32 channelID, 
 const char *channelName = 0, 
 UInt32 cntrlID = 0, 
 UInt32 subType = 0, 
 UInt32 usage = 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.

Return Value

Returns a newly allocated and initialized IOAudioControl.

See Also

Miscellaneous