SelectorControl

public class SelectorControl : AudioControl

A HAL audio selector control object

Remark

This class correponds to objects with base class kAudioSelectorControlClassID
  • Undocumented

    Declaration

    Swift

    public override var debugDescription: String { get }
  • Returns the selected items

    Remark

    This corresponds to the property kAudioSelectorControlPropertyCurrentItem

    Declaration

    Swift

    public func currentItem() throws -> [UInt32]
  • Sets the selected items

    Remark

    This corresponds to the property kAudioSelectorControlPropertyCurrentItem

    Declaration

    Swift

    public func setCurrentItem(_ value: [UInt32]) throws
  • Returns the available items

    Remark

    This corresponds to the property kAudioSelectorControlPropertyAvailableItems

    Declaration

    Swift

    public func availableItems() throws -> [UInt32]
  • Returns the name of itemID

    Remark

    This corresponds to the property kAudioSelectorControlPropertyItemName

    Declaration

    Swift

    public func nameOfItem(_ itemID: UInt32) throws -> String
  • Returns the kind of itemID

    Remark

    This corresponds to the property kAudioSelectorControlPropertyItemKind

    Declaration

    Swift

    public func kindOfItem(_ itemID: UInt32) throws -> UInt32
  • An item in a selector control

    See more

    Declaration

    Swift

    public struct Item
    extension SelectorControl.Item: CustomDebugStringConvertible
  • Returns true if self has selector

    Declaration

    Swift

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