AudioAggregateDevice

public class AudioAggregateDevice : AudioDevice

A HAL audio aggregate device object

Remark

This class correponds to objects with the base class kAudioAggregateDeviceClassID
  • Returns the UIDs of all subdevices in the aggregate device, active or inactive

    Remark

    This corresponds to the property kAudioAggregateDevicePropertyFullSubDeviceList

    Declaration

    Swift

    public func fullSubdeviceList() throws -> [String]
  • Returns the active subdevices in the aggregate device

    Remark

    This corresponds to the property kAudioAggregateDevicePropertyActiveSubDeviceList

    Declaration

    Swift

    public func activeSubdeviceList() throws -> [AudioDevice]
  • Returns the composition

    Remark

    This corresponds to the property kAudioAggregateDevicePropertyComposition

    Declaration

    Swift

    public func composition() throws -> [AnyHashable : Any]
  • Returns the master subdevice

    Remark

    This corresponds to the property kAudioAggregateDevicePropertyMasterSubDevice

    Declaration

    Swift

    public func masterSubdevice() throws -> AudioDevice
  • Returns the clock device

    Remark

    This corresponds to the property kAudioAggregateDevicePropertyClockDevice

    Declaration

    Swift

    public func clockDevice() throws -> AudioClockDevice
  • Sets the clock device

    Remark

    This corresponds to the property kAudioAggregateDevicePropertyClockDevice

    Declaration

    Swift

    public func setClockDevice(_ value: AudioClockDevice) throws
  • Returns true if the aggregate device is private

    Remark

    This corresponds to the value of kAudioAggregateDeviceIsPrivateKey in composition()

    Declaration

    Swift

    public func isPrivate() throws -> Bool
  • Returns true if the aggregate device is stacked

    Remark

    This corresponds to the value of kAudioAggregateDeviceIsStackedKey in composition()

    Declaration

    Swift

    public func isStacked() throws -> Bool
  • Returns true if self has selector in scope on element

    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 if selector in scope on element is settable

    Throws

    An error if self does not have the requested property

    Declaration

    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 when selector in scope on element changes

    Throws

    An error if the property listener could not be registered

    Declaration

    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