AudioControl
public class AudioControl : AudioObject
A HAL audio control object
This class has a single scope (kAudioObjectPropertyScopeGlobal
) and a single element (kAudioObjectPropertyElementMaster
)
Remark
This class correponds to objects with base classkAudioControlClassID
-
Undocumented
Declaration
Swift
public override var debugDescription: String { get }
-
Returns the control’s scope
Remark
This corresponds to the propertykAudioControlPropertyScope
Declaration
Swift
public func scope() throws -> PropertyScope
-
Returns the control’s element
Remark
This corresponds to the propertykAudioControlPropertyElement
Declaration
Swift
public func element() throws -> PropertyElement
-
Returns
true
ifself
hasselector
Declaration
Swift
public func hasSelector(_ selector: AudioObjectSelector<AudioControl>) -> Bool
Parameters
selector
The selector of the desired property
-
Returns
true
ifselector
is settableThrows
An error ifself
does not have the requested propertyDeclaration
Swift
public func isSelectorSettable(_ selector: AudioObjectSelector<AudioControl>) throws -> Bool
Parameters
selector
The selector of the desired property
-
Registers
block
to be performed whenselector
changesThrows
An error if the property listener could not be registeredDeclaration
Swift
public func whenSelectorChanges(_ selector: AudioObjectSelector<AudioControl>, 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