Instance Property

audioOutputDeviceUniqueID

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

Declaration

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 NSString containing the unique identifier of the Core Audio output device to use for audio output. kAudioDevicePropertyDeviceUID is a suitable source of audio output device unique IDs.

Modifying this property while the timebase's rate is not 0.0 may cause the rate to briefly change to 0.0.

On macOS, you can use the audio device clock as the AVSampleBufferRenderSynchronizer and all attached 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.

See Also

Inspecting Sample Buffers

var volume: Float

The current audio volume for the audio renderer.

var isMuted: Bool

A Boolean value that indicates whether audio for the renderer is in a muted state.

var audioTimePitchAlgorithm: AVAudioTimePitchAlgorithm

The processing algorithm used to manage audio pitch at different rates.

struct AVAudioTimePitchAlgorithm

An algorithm used to set the audio pitch as the rate changes.

var status: AVQueuedSampleBufferRenderingStatus

The status of the audio renderer.

enum AVQueuedSampleBufferRenderingStatus

The statuses for sample buffer rendering.