ADC Home > Reference Library > Reference > Darwin > Kernel Framework Reference
|
IOAudioPort |
Inherits from: | |
Declared In: |
Represents a logical or physical port or functional unit in an audio device.
An IOAudioPort represents an element in the signal chain in the audio device. It may contain one or more controls (represented by IOAudioControl) by which different attributes of the port may be represented and adjusted.
IOAudioPort objects are connected up in the IORegistry in the IOAudioPlane to represent the signal chain of the device. They may be connected to other IOAudioPorts as well as IOAudioEngines to indicate they either feed into or are fed by one of the audio engines (i.e. they provide input to or take output from the computer).
Adds a newly created IOAudioControl instance to the port.
Called to shut down all of the audio controls for this port.
Frees all of the resources allocated by the IOAudioPort.
Initializes a newly allocated IOAudioPort instance with the given attributes
Called to start a newly created IOAudioPort.
Called when the IOAudioDevice is stopping when it is no longer available.
Allocates a new IOAudioPort instance with the given attributes
addAudioControl |
Adds a newly created IOAudioControl instance to the port.
public
virtual IOReturn addAudioControl( IOAudioControl *control);
control
A newly created IOAudioControl instance that should belong to this port.
Returns true on successfully staring the IOAudioControl.
This method is responsible for starting the new IOAudioControl and adding it to the internal audioControls array.
deactivateAudioControls |
Called to shut down all of the audio controls for this port.
public
virtual void deactivateAudioControls();
This will stop all of the audio controls and release them so that the instances may be freed. This is called from the free() method.
free |
Frees all of the resources allocated by the IOAudioPort.
public
virtual void free();
Do not call this directly. This is called automatically by the system when the instance's refcount goes to 0. To decrement the refcount, call release() on the object.
initWithAttributes |
Initializes a newly allocated IOAudioPort instance with the given attributes
public
virtual bool initWithAttributes( UInt32 portType, const char *portName = 0, UInt32 subType = 0, OSDictionary *properties = 0);
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)
Returns true on success.
The properties parameter is passed on the superclass' init(). The portType, subType and properties parameters are optional, however portType is recommended.
start |
Called to start a newly created IOAudioPort.
public
virtual bool start( IOService *provider);
provider
The IOAudioDevice that owns this port
Returns true on success
This is called automatically by IOAudioDevice when attachAudioPort() is called.
stop |
Called when the IOAudioDevice is stopping when it is no longer available.
public
virtual void stop( IOService *provider);
provider
The IOAudioDevice that owns this port
This method calls deactivateAudioControls() to shut down all of the controls associated with this port.
withAttributes |
Allocates a new IOAudioPort instance with the given attributes
public
static IOAudioPort *withAttributes( UInt32 portType, const char *portName = 0, UInt32 subType = 0, OSDictionary *properties = 0);
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)
Returns the newly allocated and initialized IOAudioPort instance.
This static method allocates a new IOAudioPort and calls initWithAttributes() on it with the parameters passed in to it.
|
Last Updated: 2008-12-19