2011-09-05 2 views

답변

0

AVFoundation 프레임 워크를 사용해야합니다. 다음과 같이 AVAudioPlayer 클래스를 사용할 수 있습니다.

NSString * fPath = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"audiofile.mp3"]; 
NSURL * url = [NSURL fileURLWithPath:fPath]; 
AVAudioPlayer * audioPlayer = [[AVAudioPlayer alloc] initWithContentsOfURL:url 
                    error:nil]; 
audioPlayer.numberOfLoops = -1; 
[audioPlayer play]; 
관련 문제