---
title: destinationAudioUnit
framework: avfaudio
role: symbol
role_heading: Instance Property
path: avfaudio/avmusictrack/destinationaudiounit
---

# destinationAudioUnit

The audio unit that receives the track’s events.

## Declaration

```swift
var destinationAudioUnit: AVAudioUnit? { get set }
```

## Discussion

Discussion This property and a destinationMIDIEndpoint are mutually exclusive. You must attach the audio to an audio engine to receive events. The track must be part of the AVAudioSequencer you associate with the same engine. When playing, the track sends it’s events to that AVAudioUnit. You can’t change the destination audio unit while the track’s sequence is in a playing state.

## See Also

### Configuring the Track Destinations

- [destinationMIDIEndpoint](avfaudio/avmusictrack/destinationmidiendpoint.md)
