title: Sound not playing with AVAudioPlayer
body: <p>I've searched and I believe my problem is quite unique. I'm aware of the Simulator 5.1 bug when using AVAudioPlayer which isn't my problem. I'm running on a iOS 5.1 device.</p>
  
  <p>Here's my header file:</p>
  
  <pre><code>#import &lt;UIKit/UIKit.h&gt;
  #import &lt;Foundation/Foundation.h&gt;
  #import &lt;AVFoundation/AVAudioPlayer.h&gt;
  
  -(IBAction)pushBell;
  
  @end
  </code></pre>
  
  <p>and my implementation file:</p>
  
  <pre><code>#import "BellViewController.h"
  
  @interface BellViewController ()
  
  @end
  
  @implementation BellViewController
  
  -(IBAction)pushBell {
  
      NSString *soundPath =[[NSBundle mainBundle] pathForResource:@"bell1" ofType:@"caf"];
      NSURL *soundURL = [NSURL fileURLWithPath:soundPath];
      NSError *error;
  
      AVAudioPlayer *theAudio = [[AVAudioPlayer alloc] initWithContentsOfURL:soundURL error:&amp;error];
      [theAudio setDelegate:self];
      [theAudio setNumberOfLoops:0];
      [theAudio play];
  
  }
  
  @end
  </code></pre>
  
  <p>And I have a button in my .xib that plays the file.</p>
  
  <p><em>To make sure I referenced my audio file correctly, I deliberately type a wrong file name and indeed I got an exception. To make sure the file is playable, I mailed it to myself and played it on the device.</em></p>
  
  <p>When I tap the button I hear nothing. There are no errors. I don't know what is wrong.</p>
  
  <p><strong>More information</strong>
  iPhone 4 with iOS 5.1
  Xcode 4.3.2
  Audio is about 700kbps converted to .caf format using afconvert from a big .wav file.</p>