AudioSubdevice

public class AudioSubdevice : AudioDevice

A HAL audio subdevice

Remark

This class correponds to objects with base class kAudioSubDeviceClassID
  • Returns the extra latency

    Remark

    This corresponds to the property kAudioSubDevicePropertyExtraLatency

    Declaration

    Swift

    public func extraLatency() throws -> Double
  • Returns the drift compensation

    Remark

    This corresponds to the property kAudioSubDevicePropertyDriftCompensation

    Declaration

    Swift

    public func driftCompensation() throws -> Bool
  • Sets the drift compensation

    Remark

    This corresponds to the property kAudioSubDevicePropertyDriftCompensation

    Declaration

    Swift

    public func setDriftCompensation(_ value: Bool) throws
  • Returns the drift compensation quality

    Remark

    This corresponds to the property kAudioSubDevicePropertyDriftCompensationQuality

    Declaration

    Swift

    public func driftCompensationQuality() throws -> UInt32
  • Sets the drift compensation quality

    Remark

    This corresponds to the property kAudioSubDevicePropertyDriftCompensationQuality

    Declaration

    Swift

    public func setDriftCompensationQuality(_ value: UInt32) throws
  • A thin wrapper around a HAL audio subdevice drift compensation quality setting

    See more

    Declaration

    Swift

    public struct DriftCompensationQuality : RawRepresentable, ExpressibleByIntegerLiteral, ExpressibleByStringLiteral
    extension AudioSubdevice.DriftCompensationQuality: CustomDebugStringConvertible
  • Returns true if self has selector in scope on element

    Declaration

    Swift

    public func hasSelector(_ selector: AudioObjectSelector<AudioSubdevice>, 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<AudioSubdevice>, 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<AudioSubdevice>, 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