title: How to debug why a sound won't play via AVAudioPlayer?
body: <p>I have a simple iPhone app with several sounds already playing.  However, one in particularly won't.  The code block I've hacked up is:</p>
  
  <pre><code>NSString *soundPath2 = [[NSBundle mainBundle] pathForResource:@"gameover" ofType:@"wav"];
  NSURL *soundFileURL2 = [NSURL fileURLWithPath:soundPath2];
  NSError *err;
  AVAudioPlayer *sound2 = [[[AVAudioPlayer alloc] initWithContentsOfURL:soundFileURL2 error:&amp;err] autorelease];
  NSLog(@"Error: %@", [err description]);
  NSLog(@"Duration: %f ", [sound2 duration]);
  BOOL b = [sound2 play];
  NSLog(@"Play Bool: %d", b);
  </code></pre>
  
  <p>The console shows the error is null, the boolean returns true, and even the duration is correct!  Yet, play does nothing.  If I change "gameover" to another sound (a simple beep), all is fine.</p>
  
  <p>While it would be great to get it play, I'm also struggling to understand what error conditions, etc. I can check to 1) know it failed and 2) why.</p>
  
  <p>The sound is question is available at <a href="http://wdr1.com/gameover.wav" rel="nofollow noreferrer">http://wdr1.com/gameover.wav</a>.</p>