title: AVAudioPlayer returns wrong file duration
body: <p>I use <code>AVAudioPlayer</code> for playing audio file and <code>UISlider</code> to show user current time. Firstly, it looked that everything is fine but I noticed that audio player returns wrong file duration. For example it returns me duration equals to 3.5sec but  file durations is equal to 6 sec. in reality.</p>
  
  <p>Do you know What can cause this problem? </p>
  
  <p>Below you can see my code which return file duration:</p>
  
  <pre><code>- (NSTimeInterval)audioDurationAtURL:(NSURL *)url
  {
     NSError *error;
     NSData *data = [NSData dataWithContentsOfURL:url];
     _audioPlayer = [[AVAudioPlayer alloc] initWithData:data error:&amp;error];
     return _audioPlayer.duration;
  }
  </code></pre>