AudioAggregateDevice
public class AudioAggregateDevice : AudioDevice
A HAL audio aggregate device object
Remark
This class correponds to objects with the base classkAudioAggregateDeviceClassID
-
Returns the UIDs of all subdevices in the aggregate device, active or inactive
Remark
This corresponds to the propertykAudioAggregateDevicePropertyFullSubDeviceList
Declaration
Swift
public func fullSubdeviceList() throws -> [String]
-
Returns the active subdevices in the aggregate device
Remark
This corresponds to the propertykAudioAggregateDevicePropertyActiveSubDeviceList
Declaration
Swift
public func activeSubdeviceList() throws -> [AudioDevice]
-
Returns the composition
Remark
This corresponds to the propertykAudioAggregateDevicePropertyComposition
Declaration
Swift
public func composition() throws -> [AnyHashable : Any]
-
Returns the master subdevice
Remark
This corresponds to the propertykAudioAggregateDevicePropertyMasterSubDevice
Declaration
Swift
public func masterSubdevice() throws -> AudioDevice
-
Returns the clock device
Remark
This corresponds to the propertykAudioAggregateDevicePropertyClockDevice
Declaration
Swift
public func clockDevice() throws -> AudioClockDevice
-
Sets the clock device
Remark
This corresponds to the propertykAudioAggregateDevicePropertyClockDevice
Declaration
Swift
public func setClockDevice(_ value: AudioClockDevice) throws
-
Returns
true
if the aggregate device is privateDeclaration
Swift
public func isPrivate() throws -> Bool
-
Returns
true
if the aggregate device is stackedDeclaration
Swift
public func isStacked() throws -> Bool
-
Returns
true
ifself
hasselector
inscope
onelement
Declaration
Swift
public func hasSelector(_ selector: AudioObjectSelector<AudioAggregateDevice>, inScope scope: PropertyScope = .global, onElement element: PropertyElement = .master) -> Bool
Parameters
selector
The selector of the desired property
scope
The desired scope
element
The desired element
-
Returns
true
ifselector
inscope
onelement
is settableThrows
An error ifself
does not have the requested propertyDeclaration
Swift
public func isSelectorSettable(_ selector: AudioObjectSelector<AudioAggregateDevice>, inScope scope: PropertyScope = .global, onElement element: PropertyElement = .master) throws -> Bool
Parameters
selector
The selector of the desired property
scope
The desired scope
element
The desired element
-
Registers
block
to be performed whenselector
inscope
onelement
changesThrows
An error if the property listener could not be registeredDeclaration
Swift
public func whenSelectorChanges(_ selector: AudioObjectSelector<AudioAggregateDevice>, inScope scope: PropertyScope = .global, onElement element: PropertyElement = .master, perform block: PropertyChangeNotificationBlock?) throws
Parameters
selector
The selector of the desired property
scope
The desired scope
element
The desired element
block
A closure to invoke when the property changes or
nil
to remove the previous value