Unfortunately, you cannot, as the name suggests, it is designed to play sounds that will be used for system alerts, where you do not need to control them. You can stop the sound played through AudioServicesPlaySystemSound() by calling AudioServicesDisposeSystemSoundID() , but this is hacked and best avoided.
The best option for simple and easy audio playback control is to use AVPlayer , part of AVFoundation is the documentation here .
lxt
source share