Contents

withAttributes

Allocates a new IOAudioPort instance with the given attributes

Declaration

static IOAudioPort *withAttributes(
 UInt32 portType,
 const char *portName = 0,
 UInt32 subType = 0,
 OSDictionary *properties = 0);

Parameters

  • portType:

    A readable string representing the type of port. Common port types are defined in IOAudioTypes.h and are prefixed with 'kIOAudioPortType'. Please provide feedback if there are other common port types that should be included.

  • portName:

    A readable string representing the name of the port. For example: 'Internal Speaker', 'Line Out'. This field is optional, but useful for providing information to the application/user.

  • subType:

    Developer defined readable string representing a subtype for the port. (optional)

  • properties:

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

Return Value

Returns the newly allocated and initialized IOAudioPort instance.

Overview

This static method allocates a new IOAudioPort and calls initWithAttributes() on it with the parameters passed in to it.

See Also

Miscellaneous