I created a simple audio app which plays a mp3 file. It works with no problem on Simulator(iOS 5 and 6) and iPod3GS (with iOS 5.1). But when I tried on my iPhone4S(iOS 6), it seems to work but doesn't sound anything.
"[audioPlayer duration]" gives me right value, and even "audioPlayerDidFinishPlaying" message of delegate shows the right finishing of play after duration time.
My iPhone4S works with no problem in other sound apps like Music, Video or Podcast. Only it can't sound with my own custom app.
NSURL *url = [NSURL fileURLWithPath:[[NSBundle mainBundle] pathForResource:@"banana" ofType:@"mp3"]];
NSError *error;
if (error) {
NSLog(@"error in audioPlayer:%@", [error localizedDescription]);
}
else {
self.audioPlayer.delegate = self;
[self.audioPlayer prepareToPlay];
}
Is it simply a device problem or is there any clue about this problem? Anyone had the similar experience?
I reset setting values on my phone and I rebooted it, but still the same problem. I tested with mp3, wav and aiff files.
Turn the silencer off.
And double-check that you have both volumes turned up.