Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [[AVAudioSession sharedInstance] setCategory:AVAudioSessionCategoryPlayback error:nil];
- NSString *filePath = [[NSBundle mainBundle] pathForResource:@"0001" ofType:@"caf"];
- NSURL *fileURL = [[NSURL alloc] initFileURLWithPath:filePath];
- AVAudioPlayer *audioPlayer = [[AVAudioPlayer alloc] initWithContentsOfURL:fileURL error:nil];
- [fileURL release];
- [audioPlayer prepareToPlay];
- [audioPlayer play];
- [audioPlayer release];
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement