What framework need for create real time sound effects in iOS
I create new app. For my new app I want to create sound effects for my music which play in real 开发者_如何学运维time. someone know what framework need for it?
You should use the AVFoundation framework. You can use the AVAudioPlayer class like this:
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];
精彩评论