AudioPlugIn

public class AudioPlugIn : AudioObject

A HAL audio plug-in object

This class has a single scope (kAudioObjectPropertyScopeGlobal) and a single element (kAudioObjectPropertyElementMaster)

Remark

This class correponds to objects of type kAudioPlugInClassID
  • Returns the available audio plug-ins

    Remark

    This corresponds to the propertykAudioHardwarePropertyPlugInList on kAudioObjectSystemObject

    Declaration

    Swift

    public class func plugIns() throws -> [AudioPlugIn]
  • Returns an initialized AudioPlugIn with bundleID or nil if unknown

    Remark

    This corresponds to the property kAudioHardwarePropertyTranslateBundleIDToPlugIn on kAudioObjectSystemObject

    Declaration

    Swift

    public class func makePlugIn(forBundleID bundleID: String) throws -> AudioPlugIn?

    Parameters

    bundleID

    The bundle ID of the desired plug-in

  • Undocumented

    Declaration

    Swift

    public override var debugDescription: String { get }
  • Returns the plug-in’s bundle ID

    Remark

    This corresponds to the property kAudioPlugInPropertyBundleID

    Declaration

    Swift

    public func bundleID() throws -> String
  • Returns the audio devices provided by the plug-in

    Remark

    This corresponds to the property kAudioPlugInPropertyDeviceList

    Declaration

    Swift

    public func deviceList() throws -> [AudioDevice]
  • Returns the audio device provided by the plug-in with the specified UID or nil if unknown

    Remark

    This corresponds to the property kAudioPlugInPropertyTranslateUIDToDevice

    Declaration

    Swift

    public func device(forUID uid: String) throws -> AudioDevice?

    Parameters

    uid

    The UID of the desired device

  • Returns the audio boxes provided by the plug-in

    Remark

    This corresponds to the property kAudioPlugInPropertyBoxList

    Declaration

    Swift

    public func boxList() throws -> [AudioBox]
  • Returns the audio box provided by the plug-in with the specified UID or nil if unknown

    Remark

    This corresponds to the property kAudioPlugInPropertyTranslateUIDToBox

    Declaration

    Swift

    public func box(forUID uid: String) throws -> AudioBox?

    Parameters

    uid

    The UID of the desired box

  • Returns the clock devices provided by the plug-in

    Remark

    This corresponds to the property kAudioPlugInPropertyClockDeviceList

    Declaration

    Swift

    public func clockDeviceList() throws -> [AudioClockDevice]
  • Returns the audio clock device provided by the plug-in with the specified UID or nil if unknown

    Remark

    This corresponds to the property kAudioPlugInPropertyTranslateUIDToClockDevice

    Declaration

    Swift

    public func clockDevice(forUID uid: String) throws -> AudioClockDevice?

    Parameters

    uid

    The UID of the desired clock device

  • Returns true if self has selector

    Declaration

    Swift

    public func hasSelector(_ selector: AudioObjectSelector<AudioPlugIn>) -> Bool

    Parameters

    selector

    The selector of the desired property

  • Returns true if selector is settable

    Throws

    An error if self does not have the requested property

    Declaration

    Swift

    public func isSelectorSettable(_ selector: AudioObjectSelector<AudioPlugIn>) throws -> Bool

    Parameters

    selector

    The selector of the desired property

  • Registers block to be performed when selector changes

    Throws

    An error if the property listener could not be registered

    Declaration

    Swift

    public func whenSelectorChanges(_ selector: AudioObjectSelector<AudioPlugIn>, perform block: PropertyChangeNotificationBlock?) throws

    Parameters

    selector

    The selector of the desired property

    block

    A closure to invoke when the property changes or nil to remove the previous value