<!--
{
  "documentType" : "article",
  "framework" : "AudioToolbox",
  "identifier" : "/documentation/AudioToolbox/audio-services",
  "metadataVersion" : "0.1.0",
  "role" : "collectionGroup",
  "title" : "Audio Services"
}
-->

# Audio Services

Play short sounds or trigger a vibration effect on iOS devices with the appropriate hardware.

## Discussion

System Sound Services provides a C interface for playing short sounds and for invoking vibration on iOS devices that support vibration.

You can use System Sound Services to play short (30 seconds or shorter) sounds. The interface does not provide level, positioning, looping, or timing control, and does not support simultaneous playback: You can play only one sound at a time. You can use System Sound Services to provide audible alerts. On some iOS devices, alerts can include vibration.

## Topics

### Creating and Disposing of System Sound Objects

[`AudioServicesCreateSystemSoundID(_:_:)`](/documentation/AudioToolbox/AudioServicesCreateSystemSoundID(_:_:))

Creates a system sound object.

[`AudioServicesDisposeSystemSoundID(_:)`](/documentation/AudioToolbox/AudioServicesDisposeSystemSoundID(_:))

Disposes of a system sound object and associated resources.

[`SystemSoundID`](/documentation/AudioToolbox/SystemSoundID)

A system sound object, identified with a sound file you want to play.

[System Sounds](/documentation/AudioToolbox/1405222-system-sounds)

[Alert Sound Identifiers](/documentation/AudioToolbox/1618202-alert-sound-identifiers)

Identifiers for alert sounds and alternatives to sounds, for use with the [`AudioServicesPlayAlertSound(_:)`](/documentation/AudioToolbox/AudioServicesPlayAlertSound(_:)) function.

### Playing Sounds

[`AudioServicesPlayAlertSoundWithCompletion(_:_:)`](/documentation/AudioToolbox/AudioServicesPlayAlertSoundWithCompletion(_:_:))

[`AudioServicesPlaySystemSoundWithCompletion(_:_:)`](/documentation/AudioToolbox/AudioServicesPlaySystemSoundWithCompletion(_:_:))

[`AudioServicesPlayAlertSound(_:)`](/documentation/AudioToolbox/AudioServicesPlayAlertSound(_:))

Plays a system sound as an alert.

[`AudioServicesPlaySystemSound(_:)`](/documentation/AudioToolbox/AudioServicesPlaySystemSound(_:))

Plays a system sound object.

### Adding and Removing System Sound Callbacks

[`AudioServicesAddSystemSoundCompletion(_:_:_:_:_:)`](/documentation/AudioToolbox/AudioServicesAddSystemSoundCompletion(_:_:_:_:_:))

Registers a callback function that is invoked when a specified system sound finishes playing.

[`AudioServicesRemoveSystemSoundCompletion(_:)`](/documentation/AudioToolbox/AudioServicesRemoveSystemSoundCompletion(_:))

Unregisters any completion callback functions that were registered for a specified system sound.

[`AudioServicesSystemSoundCompletionProc`](/documentation/AudioToolbox/AudioServicesSystemSoundCompletionProc)

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

### Managing System Sound Services Properties

[`AudioServicesGetPropertyInfo(_:_:_:_:_:)`](/documentation/AudioToolbox/AudioServicesGetPropertyInfo(_:_:_:_:_:))

Gets information about a System Sound Services property.

[`AudioServicesGetProperty(_:_:_:_:_:)`](/documentation/AudioToolbox/AudioServicesGetProperty(_:_:_:_:_:))

Gets a specified System Sound Services property value.

[`AudioServicesSetProperty(_:_:_:_:_:)`](/documentation/AudioToolbox/AudioServicesSetProperty(_:_:_:_:_:))

Sets the value for a specified System Sound Services property.

[`AudioServicesPropertyID`](/documentation/AudioToolbox/AudioServicesPropertyID)

The data type for a system sound property identifier.

[System Sound Services Property Identifiers](/documentation/AudioToolbox/1405268-system-sound-services-property-i)

Property identifiers used when playing alerts with System Sound Services.

[Audio Hardware Services Properties](/documentation/AudioToolbox/1405208-audio-hardware-services-properti)

Property identifiers that apply to HAL audio objects only when accessed via the Audio Hardware Services.

### Getting Error Codes

This table lists the result codes defined for System Sound Services.

[Audio Services Errors](/documentation/AudioToolbox/1405232-audio-services-errors)

[`kAudioServicesNoError`](/documentation/AudioToolbox/kAudioServicesNoError)

No error has occurred.

[`kAudioServicesUnsupportedPropertyError`](/documentation/AudioToolbox/kAudioServicesUnsupportedPropertyError)

The property is not supported.

[`kAudioServicesBadPropertySizeError`](/documentation/AudioToolbox/kAudioServicesBadPropertySizeError)

The size of the property data was not correct.

[`kAudioServicesBadSpecifierSizeError`](/documentation/AudioToolbox/kAudioServicesBadSpecifierSizeError)

The size of the specifier data was not correct.

[`kAudioServicesSystemSoundUnspecifiedError`](/documentation/AudioToolbox/kAudioServicesSystemSoundUnspecifiedError)

An unspecified error has occurred.

[`kAudioServicesSystemSoundClientTimedOutError`](/documentation/AudioToolbox/kAudioServicesSystemSoundClientTimedOutError)

System sound client message timed out.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)