开发者

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];
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜