AudioClockDevice
public class AudioClockDevice : AudioObject
A HAL audio clock device object
This class has a single scope (kAudioObjectPropertyScopeGlobal) and a single element (kAudioObjectPropertyElementMaster)
Remark
This class correponds to objects with base classkAudioClockDeviceClassID
-
Returns the available audio clock devices
Remark
This corresponds to the propertykAudioHardwarePropertyClockDeviceListonkAudioObjectSystemObjectDeclaration
Swift
public class func clockDevices() throws -> [AudioClockDevice] -
Returns an initialized
AudioClockDevicewithuidornilif unknownRemark
This corresponds to the propertykAudioHardwarePropertyTranslateUIDToClockDeviceonkAudioObjectSystemObjectDeclaration
Swift
public class func makeClockDevice(forUID uid: String) throws -> AudioClockDevice?Parameters
uidThe UID of the desired clock device
-
Returns the clock device UID
Remark
This corresponds to the propertykAudioClockDevicePropertyDeviceUIDDeclaration
Swift
public func deviceUID() throws -> String -
Returns the transport type
Remark
This corresponds to the propertykAudioClockDevicePropertyTransportTypeDeclaration
Swift
public func transportType() throws -> AudioDevice.TransportType -
Returns the domain
Remark
This corresponds to the propertykAudioClockDevicePropertyClockDomainDeclaration
Swift
public func domain() throws -> UInt32 -
Returns
trueif the clock device is aliveRemark
This corresponds to the propertykAudioClockDevicePropertyDeviceIsAliveDeclaration
Swift
public func isAlive() throws -> Bool -
Returns
trueif the clock device is runningRemark
This corresponds to the propertykAudioClockDevicePropertyClockDomainDeclaration
Swift
public func isRunning() throws -> Bool -
Returns the latency
Remark
This corresponds to the propertykAudioClockDevicePropertyDeviceIsRunningDeclaration
Swift
public func latency() throws -> UInt32 -
Returns the audio controls owned by
selfRemark
This corresponds to the propertykAudioClockDevicePropertyControlListDeclaration
Swift
public func controlList() throws -> [AudioControl] -
Returns the sample rate
Remark
This corresponds to the propertykAudioClockDevicePropertyNominalSampleRateDeclaration
Swift
public func sampleRate() throws -> Double -
Returns the available sample rates
Remark
This corresponds to the propertykAudioClockDevicePropertyAvailableNominalSampleRatesDeclaration
Swift
public func availableSampleRates() throws -> [ClosedRange<Double>] -
Returns
trueifselfhasselectorDeclaration
Swift
public func hasSelector(_ selector: AudioObjectSelector<AudioClockDevice>) -> BoolParameters
selectorThe selector of the desired property
-
Returns
trueifselectoris settableThrows
An error ifselfdoes not have the requested propertyDeclaration
Swift
public func isSelectorSettable(_ selector: AudioObjectSelector<AudioClockDevice>) 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<AudioClockDevice>, 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
AudioClockDevice Class Reference