AFList Class Reference


Overview


AFList contains a list of AFDevices that it creates during initialization and updates when devices are added or removed.

You usually do not create and initialize this object yourself. Instead, let AFManager create the AFList objects.



Tasks


Creating Instances

-
initAsInput:


Properties

-
isInput
-
devices
-
menu


Fetching an AFDevice

-
deviceWithID:
-
deviceWithName:
-
defaultDevice


Updating the List

-
refreshDeviceList




Instance Methods



devices

Returns an array of devices in the AFList.

- (NSArray)devices

Return Value

an array of devices in the AFList.



initAsInput:

Initializes the AFList object as either an input or as an output object.

You usually do not create and initialize this object yourself. Instead, let
AFManager create the AFList objects.

- (id)initAsInput:(Boolean*)isInput

Parameters

isInput
true if initializing as an input AFList.

Return Value

An initialized AFList object or nil if the object could not be created.


isInput

Returns true if the AFList contains input devices.

- (Boolean)isInput

Return Value

true if the AFList contains input devices.



deviceWithID:

Returns an AFDevice in the AFList that has the specified AudioDeviceID.

- (AFDevice*)deviceWithID:(AudioDeviceID*)deviceID

Parameters

deviceID
the AudioDeviceID to look for a match.

Return Value

The AFDevice object, or nil if a match is not found for the deviceID.



deviceWithName:

Returns an AFDevice in the AFList that has the specified name.

- (AFDevice*)deviceWithName:(NSString*)name

Parameters

name
the name of a sound card to look for a match.

Return Value

The AFDevice object, or nil if a match is not found for the name.


defaultDevice

Returns the AFDevice that corresponds to the default device selected in the Sound Pref panel of the System Preferences.

- (AFDevice*)defaultDevice

Return Value

The AFDevice object.



menu

Returns a menu with the name of the devices in the AFList. If a name is duplicated (for example, two external sound cards from the same manufacturer), the device name is substituted with its unique name.

- (NSMenu*)menu

Return Value

menu with unique names of the devices in the AFList.



refreshDeviceList

Causes the receiver to update its list.

- (void)refreshDeviceList