View Full Version : AudioServicesPlaySystemSound(soundID) - How to STOP a sound?
Dec 18, 2008, 01:11 AM
I am playing a sound effect that is about 5 seconds long with the calls above. How do I stop the sound right in the middle of it playing?
Dec 18, 2008, 03:50 PM
You can't. If you can target the 2.2 SDK, you can use the AVAudioPlayer class, which makes manipulating sound a LOT easier than it was in 2.0/2.1
Dec 18, 2008, 06:38 PM
There's no method to pause it (which is why most people use AudioQueue or OpenAL) or stop it (in a sense where you're simply stopping the sound ready to be played again), but you can use the AudioServicesDisposeSystemSoundID which will theoretically stop the sound.
Dec 19, 2008, 09:45 AM
Another vote for AVAudio here.