In this episode we add looping background music to the game using AVFoundation and AVAudioPlayer. We then add sound effects using Sprite Kit's SKAction. In order to reduce lag, we preload the audio files so that they play instantaneously. We also implement rate limiting to avoid sound effect overload using SAMRateLimit.
This is a companion discussion topic for the original entry at https://nsscreencast.com/episodes/114-playing-sounds-with-sprite-kit