Type Alias


Invoked when a system sound finishes playing.


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



The system sound that has finished playing.


Application data that you specified when registering the callback function.


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


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

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software