Type Alias

AudioServicesSystemSoundCompletionProc

Invoked when a system sound finishes playing.

Declaration

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

Parameters

ssID

The system sound that has finished playing.

clientData

Application data that you specified when registering the callback function.

Discussion

If you named your function MyAudioServicesSystemSoundCompletionProc, you would declare it like this:

Discussion

Because a system sound may play for up to 30 seconds, the AudioServicesPlaySystemSound(_:) function executes asynchronously (that is, it returns immediately). This callback gets invoked when a specified system sound has finished 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