<!--
{
  "availability" : [
    "macOS: 10.8.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreMedia",
  "identifier" : "/documentation/CoreMedia/CMAudioDeviceClockSetAudioDeviceUID(_:deviceUID:)",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Core Media"
    ],
    "preciseIdentifier" : "c:@F@CMAudioDeviceClockSetAudioDeviceUID"
  },
  "title" : "CMAudioDeviceClockSetAudioDeviceUID(_:deviceUID:)"
}
-->

# CMAudioDeviceClockSetAudioDeviceUID(_:deviceUID:)

Changes the Core Audio device the clock is tracking by specifying a new device unique identifier.

```
func CMAudioDeviceClockSetAudioDeviceUID(_ clock: CMClock, deviceUID: CFString?) -> OSStatus
```

## Parameters

`clock`

The clock to change.

`deviceUID`

The UID of the Core Audio device to track.

## Discussion

Pass `NULL` for `deviceUID` to make the clock track the default device.

---

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)