LevelControl
public class LevelControl : AudioControl
A HAL audio level control object
Remark
This class correponds to objects with base classkAudioLevelControlClassID
-
Undocumented
Declaration
Swift
public override var debugDescription: String { get } -
Returns the control’s scalar value
Remark
This corresponds to the propertykAudioLevelControlPropertyScalarValueDeclaration
Swift
public func scalarValue() throws -> Float -
Sets the control’s scalar value
Remark
This corresponds to the propertykAudioLevelControlPropertyScalarValueDeclaration
Swift
public func setScalarValue(_ value: Float) throws -
Returns the control’s decibel value
Remark
This corresponds to the propertykAudioLevelControlPropertyDecibelValueDeclaration
Swift
public func decibelValue() throws -> Float -
Sets the control’s decibel value
Remark
This corresponds to the propertykAudioLevelControlPropertyDecibelValueDeclaration
Swift
public func setDecibelValue(_ value: Float) throws -
Returns the decibel range
Remark
This corresponds to the propertykAudioLevelControlPropertyDecibelRangeDeclaration
Swift
public func decibelRange() throws -> ClosedRange<Float> -
Converts
scalarto decibels and returns the converted valueRemark
This corresponds to the propertykAudioLevelControlPropertyConvertScalarToDecibelsDeclaration
Swift
public func convertToDecibels(fromScalar scalar: Float) throws -> FloatParameters
scalarThe value to convert
-
Converts
decibelsto scalar and returns the converted valueRemark
This corresponds to the propertykAudioLevelControlPropertyConvertDecibelsToScalarDeclaration
Swift
public func convertToScalar(fromDecibels decibels: Float) throws -> FloatParameters
decibelsThe value to convert
-
Returns
trueifselfhasselectorDeclaration
Swift
public func hasSelector(_ selector: AudioObjectSelector<LevelControl>) -> BoolParameters
selectorThe selector of the desired property
-
Returns
trueifselectoris settableThrows
An error ifselfdoes not have the requested propertyDeclaration
Swift
public func isSelectorSettable(_ selector: AudioObjectSelector<LevelControl>) throws -> BoolParameters
selectorThe selector of the desired property
-
Registers
blockto be performed whenselectorchangesThrows
An error if the property listener could not be registeredDeclaration
Swift
public func whenSelectorChanges(_ selector: AudioObjectSelector<LevelControl>, perform block: PropertyChangeNotificationBlock?) throwsParameters
selectorThe selector of the desired property
blockA closure to invoke when the property changes or
nilto remove the previous value
View on GitHub
LevelControl Class Reference