AudioUnit
extension AudioUnit
-
Obtain a property description from an AudioUnit
Throws
throws exception if the property is invalidDeclaration
Swift
public func getPropertyInfo(_ pid: AudioUnitPropertyID) throws -> (size: UInt32, writable: Bool)
Parameters
pid
the key of the property to get
Return Value
a 2-tuple containing the size of the property value and a flag if it can be updated
-
Obtain the current value of a property
Throws
throws exception if the property is invalid or the size is wrongDeclaration
Swift
public func getPropertyValue<T>(_ pid: AudioUnitPropertyID) throws -> T
Parameters
pid
the key of the property to get
Return Value
the current value
-
Obtain the current value of a property
Throws
throws exception if the property is invalid or the size is wrongDeclaration
Swift
public func getPropertyValue<T>(_ pid: AudioUnitPropertyID, size: UInt32) throws -> T
Parameters
pid
the key of the property to get
size
the size of the property value type
Return Value
the current value
-
Change a property value.
Throws
throws exception if the property is invalid or the property is read-onlyDeclaration
Swift
public func setPropertyValue<T>(_ pid: AudioUnitPropertyID, value: T) throws
Parameters
pid
the key of the property to set
value
the new value to use
-
Change a property value.
Throws
throws exception if the property is invalid or the property is read-onlyDeclaration
Swift
public func setPropertyValue<T>(_ pid: AudioUnitPropertyID, size: UInt32, value: T) throws
Parameters
pid
the key of the property to set
size
the size of the value type
value
the new value to use