Hi, I'm building a voice recorder. Recoding and playing works fine on simulator. But on iphone it doesn't work. (I followed the exact steps as mentioned in iPhoneOSProgrammingGuide/AudioandVideoTechnologies)
printf("%s(player)\n",[[self.soundFileURL absoluteString] UTF8String]);
AVAudioPlayer *newPlayer =
[[AVAudioPlayer alloc] initWithContentsOfURL: self.soundFileURL error: nil];
if([self.soundFileURL isFileURL]){
printf("isFileURL\n");
}
self.player = newPlayer;
[newPlayer release];
[player prepareToPlay];
[player setDelegate: self];
//recorderLabel.text=@"Playing..";
[player play];
printf("playing..\n");
The debugger out put is file://localhost/var/mobile/Applications/9A607A45-974B-4E9F-9839-FD21B3BC9DD8/Documents/1251828741.caf(player) isFileURL playing..