---
title: AVAudioSequencerUserCallback
framework: avfaudio
role: symbol
role_heading: Type Alias
path: avfaudio/avaudiosequencerusercallback
---

# AVAudioSequencerUserCallback

A callback the sequencer calls asynchronously during playback when it encounters a user event.

## Declaration

```swift
typealias AVAudioSequencerUserCallback = (AVMusicTrack, Data, AVMusicTimeStamp) -> Void
```

## Parameters

- `track`: The track that contains the user event.
- `userData`: The data used to initialize the user event.
- `timeStamp`: The beat location of the event.

## Discussion

Discussion The sequencer delivers this callback asynchronously to the rendering thread on an internal queue. The userData this returns is unique to each AVMusicUserEvent instance.

## See Also

### Setting the User Callback

- [setUserCallback(_:)](avfaudio/avaudiosequencer/setusercallback(_:).md)
