AVAudioSessionPortDescription Class Reference

Inherits from
Conforms to
Framework
/System/Library/Frameworks/AVFoundation.framework
Availability
Available in iOS 6.0 and later.
Declared in
AVAudioSession.h

Overview

An AVAudioSessionPortDescription object describes an input or output port associated with an audio session. You can use the information in this class to obtain information about the intended usage of the port and the hardware channels it supports.

Tasks

Getting the Port Attributes

Properties

channels

An array of channel objects that identify the port’s associated hardware. (read-only)

@property(readonly) NSArray *channels
Discussion

This property contains an array of AVAudioSessionChannelDescription objects. Each one of these objects defines a hardware source or destination associated with the port.

Availability
  • Available in iOS 6.0 and later.
Declared In
AVAudioSession.h

portName

A descriptive name for the port. (read-only)

@property(readonly) NSString *portName
Discussion

Availability
  • Available in iOS 6.0 and later.
Declared In
AVAudioSession.h

portType

The type of the port. (read-only)

@property(readonly) NSString *portType
Discussion

The value of this property can be any of the constants declared in “Input or Output Port Types”, “Input Port Types”, or “Output Port Types”. These constants define the source or destination of the port.

Availability
  • Available in iOS 6.0 and later.
Declared In
AVAudioSession.h

UID

A system-assigned unique identifer (UID) for the port. (read-only)

@property(readonly) NSString * UID
Discussion

The value of this property is assigned to the owningPortUID property of every AVAudioSessionChannelDescription object in the channels property for the port.

Availability
  • Available in iOS 6.0 and later.
Declared In
AVAudioSession.h

Constants

Input or Output Port Types

Constants that indicate sources for input or output.

NSString *const AVAudioSessionPortBluetoothHFP;
NSString *const AVAudioSessionPortUSBAudio;
Constants
AVAudioSessionPortBluetoothHFP

Specifies input or output on a Bluetooth Hands-Free Profile device.

Available in iOS 6.0 and later.

Declared in AVAudioSession.h.

AVAudioSessionPortUSBAudio

Specifies input or output on a USB device.

Available in iOS 6.0 and later.

Declared in AVAudioSession.h.

Input Port Types

Constants that indicate the type of input to the device.

NSString *const AVAudioSessionPortLineIn;
NSString *const AVAudioSessionPortBuiltInMic;
NSString *const AVAudioSessionPortHeadsetMic;
Constants
AVAudioSessionPortLineIn

Specifies line-level input from the dock connector.

Available in iOS 6.0 and later.

Declared in AVAudioSession.h.

AVAudioSessionPortBuiltInMic

Specifies the built-in microphone on a device.

Available in iOS 6.0 and later.

Declared in AVAudioSession.h.

AVAudioSessionPortHeadsetMic

Specifies a microphone that is built-in to a wired headset.

Available in iOS 6.0 and later.

Declared in AVAudioSession.h.

Output Port Types

Constants that indicate the type of output from the device.

NSString *const AVAudioSessionPortLineOut;
NSString *const AVAudioSessionPortHeadphones;
NSString *const AVAudioSessionPortBluetoothA2DP;
NSString *const AVAudioSessionPortBuiltInReceiver;
NSString *const AVAudioSessionPortBuiltInSpeaker;
NSString *const AVAudioSessionPortHDMI;
NSString *const AVAudioSessionPortAirPlay;
   
Constants
AVAudioSessionPortLineOut

Specifies line-level output to the dock connector.

Available in iOS 6.0 and later.

Declared in AVAudioSession.h.

AVAudioSessionPortHeadphones

Specifies output to a wired headset.

Available in iOS 6.0 and later.

Declared in AVAudioSession.h.

AVAudioSessionPortBluetoothA2DP

Specifies output to a Bluetooth A2DP device.

Available in iOS 6.0 and later.

Declared in AVAudioSession.h.

AVAudioSessionPortBuiltInReceiver

Specifies output to the speaker that you hold to your ear. Typically, this speaker is available only on iPhone devices.

Available in iOS 6.0 and later.

Declared in AVAudioSession.h.

AVAudioSessionPortBuiltInSpeaker

Specifies output to the device’s built-in speaker.

Available in iOS 6.0 and later.

Declared in AVAudioSession.h.

AVAudioSessionPortHDMI

Specifies output to a device via the High-Definition Multimedia Interface (HDMI) specification.

Available in iOS 6.0 and later.

Declared in AVAudioSession.h.

AVAudioSessionPortAirPlay

Specifies output to a remote device over AirPlay.

Available in iOS 6.0 and later.

Declared in AVAudioSession.h.


Did this document help you? Yes It's good, but... Not helpful...