You can try:
let seconds = 1.0//Time To Delay let delay = seconds * Double(NSEC_PER_SEC) // nanoseconds per seconds var dispatchTime = dispatch_time(DISPATCH_TIME_NOW, Int64(delay)) dispatch_after(dispatchTime, dispatch_get_main_queue(), { //Play Sound here })
Full code:
func playAudioWithDelay() { let file = NSBundle.mainBundle().URLForResource("PR1", withExtension: "wav") player = AVAudioPlayer(contentsOfURL: file, error: nil) player!.volume = 0.5 player!.numberOfLoops = -1 player!.playAtTime(
Caleb source share