<!--
{
  "availability" : [
    "macOS: 10.13.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AVFoundation",
  "identifier" : "/documentation/AVFoundation/AVSampleBufferAudioRenderer/audioOutputDeviceUniqueID",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "AVFoundation"
    ],
    "preciseIdentifier" : "c:objc(cs)AVSampleBufferAudioRenderer(py)audioOutputDeviceUniqueID"
  },
  "title" : "audioOutputDeviceUniqueID"
}
-->

# audioOutputDeviceUniqueID

The unique identifier of the output device used to play audio.

```
var audioOutputDeviceUniqueID: String? { get set }
```

## Discussion

The default value of this property is `nil`, which indicates the use of the default audio device. Otherwise, set the value to an <doc://com.apple.documentation/documentation/Foundation/NSString> containing the unique identifier of the Core Audio output device to use for audio output. <doc://com.apple.documentation/documentation/CoreAudio/kAudioDevicePropertyDeviceUID> is a suitable source of audio output device unique IDs.

Modifying this property while the timebase’s rate isn’t `0.0` may cause the rate to briefly change to `0.0`.

On macOS, you can use the audio device clock as the [`AVSampleBufferRenderSynchronizer`](/documentation/AVFoundation/AVSampleBufferRenderSynchronizer) and all attached [`AVQueuedSampleBufferRendering`](/documentation/AVFoundation/AVQueuedSampleBufferRendering) timebase clocks. If you modify the `audioOutputDeviceUniqueID`, the clocks of all these timebases may also change.

If you attach multiple renderers with different values for `audioOutputDeviceUniqueID` to the same buffer renderer synchronizer, audio may not stay in sync during playback. To avoid this, ensure that all synchronized sample buffer renderers are using the same audio output 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)