开发者

What framework need for create real time sound effects in iOS

开发者 https://www.devze.com 2023-04-02 06:11 出处:网络
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

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

精彩评论

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

关注公众号