---
title: "AudioServicesPlayAlertSound(_:spatialExperience:)"
framework: audiotoolbox
role: symbol
role_heading: Function
path: "audiotoolbox/audioservicesplayalertsound(_:spatialexperience:)"
---

# AudioServicesPlayAlertSound(_:spatialExperience:)

Play an alert sound with the provided spatial audio experience.

## Declaration

```swift
func AudioServicesPlayAlertSound(_ systemSoundID: SystemSoundID, spatialExperience: any SpatialAudioExperience) async
```

## Mentioned in

Anchoring sound to a window or volume

## Discussion

Discussion The alert sound has this spatial experience for the duration of its playback and cannot change mid-playback.
