Reputation: 103
The AudioServicesPlaySystemSound
function comes under System Sound Services. Is this service of AudioToolbox allowed to use?
AudioServicesPlaySystemSound(1012);
Or can it be rejected by Apple when submitting an app using it to the App Store?
Upvotes: 1
Views: 590
Reputation: 58069
Yes, it is allowed to use. It's actually documented in Apple Developer Documentation.
There are some limitations on what you can play with this method though:
Sound files that you play using this function must be:
- No longer than 30 seconds in duration
- In linear PCM or IMA4 (IMA/ADPCM) format
- Packaged in a
.caf
,.aif
, or.wav
file
If you want level/timing control and the ability of playing multiple sounds at a time, use AVAudioPlayer instead, it's the generally recommended method.
Upvotes: 2