---
title: "CMAudioDeviceClockGetAudioDevice(_:deviceUIDOut:deviceIDOut:trackingDefaultDeviceOut:)"
framework: coremedia
role: symbol
role_heading: Function
path: "coremedia/cmaudiodeviceclockgetaudiodevice(_:deviceuidout:deviceidout:trackingdefaultdeviceout:)"
---

# CMAudioDeviceClockGetAudioDevice(_:deviceUIDOut:deviceIDOut:trackingDefaultDeviceOut:)

Returns the Core Audio device the clock is tracking.

## Declaration

```swift
func CMAudioDeviceClockGetAudioDevice(_ clock: CMClock, deviceUIDOut: AutoreleasingUnsafeMutablePointer<CFString?>?, deviceIDOut: UnsafeMutablePointer<AudioDeviceID>?, trackingDefaultDeviceOut: UnsafeMutablePointer<DarwinBoolean>?) -> OSStatus
```

## Parameters

- `clock`: The clock from which to retrieve its audio device.
- `deviceUIDOut`: An optional unique device identifier. If you specify a non-NULL value, this function returns the deviceUID and its associated ID, and sets trackingDefaultDeviceOut to false.
- `deviceIDOut`: An optional device identifier. If you specify a non-NULL value, this function returns a NULL UID and the device ID, and sets trackingDefaultDeviceOut to false.
- `trackingDefaultDeviceOut`: On return, a Boolean value that indicates whether the audio clock tracks the default audio device.

## Return Value

Return Value A value that indicates the completion status.

## See Also

### Configuring Audio Clocks

- [CMAudioDeviceClockSetAudioDeviceUID(_:deviceUID:)](coremedia/cmaudiodeviceclocksetaudiodeviceuid(_:deviceuid:).md)
- [CMAudioDeviceClockSetAudioDeviceID(_:deviceID:)](coremedia/cmaudiodeviceclocksetaudiodeviceid(_:deviceid:).md)
