From various discussions this seems to be a bug which can show its head on occasion. The short of it is that if you are experiencing these issues, and it appears you are, it comes down to skipping the SKAction playSoundFileName
and going purely with AVAudioPlayer.
You would have to:
- Only use AVAudioPlayer for all your audio as it is designed and tested to handle interruptions.
- Use NSData as a sound container to be used with AVAudioPlayer
- Each sound should have its own temporary AVAudioPlayer instance for sound lifetime only.
There is a detailed explanation of how to do this on http://iknowsomething.com/ios-sdk-spritekit-sound/