title: AVAudioPlayer makes my game look laggy
body: <p>When I use AVAudioPlayers for sound effects in my game, they cause the game to look laggy. I'm not the only one facing this problem, but from what I've found on here/other sites they don't seem to come up with an answer to solve it. Therefore I'm asking once and for all... What can I do? I've tried to use prepareToPlay in the viewDidLoad, but it doesn't help.</p>
  
  <p>Here's some code on how I use the AVAudioPlayer:</p>
  
  <pre><code>NSString *StartTap=[[NSBundle mainBundle]pathForResource:@"Tap" ofType:@"mp3"];
  StartSound=[[AVAudioPlayer alloc]initWithContentsOfURL: [NSURL fileURLWithPath:StartTap] error:NULL];
  StartSound.numberOfLoops=-0;
  </code></pre>
  
  <p>And then I call:</p>
  
  <pre><code>[StartSound play];
  </code></pre>