<!--
{
  "availability" : [
    "macCatalyst: -",
    "macOS: 15.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreAudio",
  "identifier" : "/documentation/CoreAudio/AudioHardwareClock",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "Core Audio"
    ],
    "preciseIdentifier" : "s:9CoreAudio0B13HardwareClockC"
  },
  "title" : "AudioHardwareClock"
}
-->

# AudioHardwareClock

Instances of the AudioHardwareClock class encapsulate individual audio clocks. All audio
devices inherit from the audio clock class, which provides several base properties and
contains a list of control objects. Clock objects can be used as a time source when run in
an aggregate device, but contain no IO streams.

```
class AudioHardwareClock
```

## Topics

### Initializers

[`init(id: AudioObjectID)`](/documentation/CoreAudio/AudioHardwareClock/init(id:))

### Instance Properties

[`var availableNominalSampleRates: [AudioValueRange]`](/documentation/CoreAudio/AudioHardwareClock/availableNominalSampleRates)

An array of AudioValueRange structs that indicates the valid ranges for the nominal sample
rate of the device.

[`var clockDomain: UInt32`](/documentation/CoreAudio/AudioHardwareClock/clockDomain)

A UInt32 whose value indicates the clock domain to which this object belongs. Clocks
and devices that have the same value for this property are able to be synchronized in
hardware.

[`var controls: [AudioHardwareControl]`](/documentation/CoreAudio/AudioHardwareClock/controls)

An array of AudioHardwareControls that represent the controls of the device.

[`var inputLatency: Int`](/documentation/CoreAudio/AudioHardwareClock/inputLatency)

An Int containing the number of frames of input latency in the clock.

[`var isAlive: Bool`](/documentation/CoreAudio/AudioHardwareClock/isAlive)

A Bool where a value of true indicates the device is ready and available and false
indicates the device is unusable and will most likely go away shortly.

[`var isRunning: Bool`](/documentation/CoreAudio/AudioHardwareClock/isRunning)

A Bool where a value of false indicates the device is not providing timestamps
and a value of true means that it is.

[`var nominalSampleRate: Double`](/documentation/CoreAudio/AudioHardwareClock/nominalSampleRate)

A Double that indicates the current nominal sample rate of the device.

[`var outputLatency: Int`](/documentation/CoreAudio/AudioHardwareClock/outputLatency)

An Int containing the number of frames of output latency in the clock.

[`var transportType: UInt32`](/documentation/CoreAudio/AudioHardwareClock/transportType)

A UInt32 whose value indicates how the object is connected to the CPU.
Constants for some of the values for this property can be found in the enum in the
AudioDevice Constants section of AudioHardwareBase.h.

[`var uid: String`](/documentation/CoreAudio/AudioHardwareClock/uid)

A String that contains a persistent identifier for the clock device. A clock’s UID is
persistent across boots. The content of the UID string is a black box and may contain
information that is unique to a particular instance of an clock’s hardware or unique to
the CPU. Therefore they are not suitable for passing between CPUs or for identifying
similar models of hardware.

### Instance Methods

[`func setNominalSampleRate(Double) throws`](/documentation/CoreAudio/AudioHardwareClock/setNominalSampleRate(_:))

Set the nominalSampleRate property.

## Relationships

### Conforms To

[`Sendable`](/documentation/Swift/Sendable)

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

### Inherits From

[`AudioHardwareObject`](/documentation/CoreAudio/AudioHardwareObject)

### Inherited By

[`AudioHardwareDevice`](/documentation/CoreAudio/AudioHardwareDevice)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)