title: mp3 playback failed when moved to a class
body: <p>I've problem with playing music in my app. 
  If I write this in viewcontroller viewDidLoad, everything works.</p>
  
  <pre><code>   NSURL *url = [NSURL fileURLWithPath:[NSString stringWithFormat:@"%@/jingle.caf", [[NSBundle mainBundle] resourcePath]]];
  
  NSError *error;
  audioPlayer = [[AVAudioPlayer alloc] initWithContentsOfURL:url error:&amp;error];
  audioPlayer.numberOfLoops = -1;
  
  if (audioPlayer == nil)
      NSLog([error description]);
  else
      [audioPlayer play];
  </code></pre>
  
  <p>But when I put it to my own class, instantiate it in the same viewController in viewDidLoad and call method with exactly the same code, it doesn't work. Please why?</p>