AudioSubdevice
public class AudioSubdevice : AudioDevice
A HAL audio subdevice
Remark
This class correponds to objects with base classkAudioSubDeviceClassID
-
Returns the extra latency
Remark
This corresponds to the propertykAudioSubDevicePropertyExtraLatency
Declaration
Swift
public func extraLatency() throws -> Double
-
Returns the drift compensation
Remark
This corresponds to the propertykAudioSubDevicePropertyDriftCompensation
Declaration
Swift
public func driftCompensation() throws -> Bool
-
Sets the drift compensation
Remark
This corresponds to the propertykAudioSubDevicePropertyDriftCompensation
Declaration
Swift
public func setDriftCompensation(_ value: Bool) throws
-
Returns the drift compensation quality
Remark
This corresponds to the propertykAudioSubDevicePropertyDriftCompensationQuality
Declaration
Swift
public func driftCompensationQuality() throws -> UInt32
-
Sets the drift compensation quality
Remark
This corresponds to the propertykAudioSubDevicePropertyDriftCompensationQuality
Declaration
Swift
public func setDriftCompensationQuality(_ value: UInt32) throws
-
A thin wrapper around a HAL audio subdevice drift compensation quality setting
See moreDeclaration
Swift
public struct DriftCompensationQuality : RawRepresentable, ExpressibleByIntegerLiteral, ExpressibleByStringLiteral
extension AudioSubdevice.DriftCompensationQuality: CustomDebugStringConvertible
-
Returns
true
ifself
hasselector
inscope
onelement
Declaration
Swift
public func hasSelector(_ selector: AudioObjectSelector<AudioSubdevice>, inScope scope: PropertyScope = .global, onElement element: PropertyElement = .master) -> Bool
Parameters
selector
The selector of the desired property
scope
The desired scope
element
The desired element
-
Returns
true
ifselector
inscope
onelement
is settableThrows
An error ifself
does not have the requested propertyDeclaration
Swift
public func isSelectorSettable(_ selector: AudioObjectSelector<AudioSubdevice>, inScope scope: PropertyScope = .global, onElement element: PropertyElement = .master) throws -> Bool
Parameters
selector
The selector of the desired property
scope
The desired scope
element
The desired element
-
Registers
block
to be performed whenselector
inscope
onelement
changesThrows
An error if the property listener could not be registeredDeclaration
Swift
public func whenSelectorChanges(_ selector: AudioObjectSelector<AudioSubdevice>, inScope scope: PropertyScope = .global, onElement element: PropertyElement = .master, perform block: PropertyChangeNotificationBlock?) throws
Parameters
selector
The selector of the desired property
scope
The desired scope
element
The desired element
block
A closure to invoke when the property changes or
nil
to remove the previous value