---
title: AudioServicesSystemSoundCompletionProc
framework: audiotoolbox
role: symbol
role_heading: Type Alias
path: audiotoolbox/audioservicessystemsoundcompletionproc
---

# AudioServicesSystemSoundCompletionProc

A function the system invokes when a system sound finishes playing.

## Declaration

```swift
typealias AudioServicesSystemSoundCompletionProc = (SystemSoundID, UnsafeMutableRawPointer?) -> Void
```

## Parameters

- `ssID`: The system sound that has finished playing.
- `clientData`: App data that you specified when registering the callback function.

## Discussion

Discussion Because a system sound may play for up to 30 seconds, the AudioServicesPlaySystemSound(_:) function executes asynchronously (that is, it returns immediately), and calls this function when the sound finishes playing. You can use this callback, for example, to help you avoid playing a second sound while a first sound is still playing.

## See Also

### Adding and Removing System Sound Callbacks

- [AudioServicesAddSystemSoundCompletion(_:_:_:_:_:)](audiotoolbox/audioservicesaddsystemsoundcompletion(_:_:_:_:_:).md)
- [AudioServicesRemoveSystemSoundCompletion(_:)](audiotoolbox/audioservicesremovesystemsoundcompletion(_:).md)
