0
为playeffect音频文件的使用[[SimpleAudioEngine sharedEngine] playEffect:@"sound.mp3"];
长度SimpleAudioEngine
是做什么用的音频文件的限制长度播放效果?
为playeffect音频文件的使用[[SimpleAudioEngine sharedEngine] playEffect:@"sound.mp3"];
长度SimpleAudioEngine
是做什么用的音频文件的限制长度播放效果?
我想你可以参考AVAudioFoundation这个使用AvAudioPlayer及其属性“持续时间”工作。
使用的.h
< AVAudioPlayerDelegate protocol>
AVAudioPlayer *audioPlayer;
@property (nonatomic, retain) AVAudioPlayer *audioPlayer;
.M
audioPlayer = [[AVAudioPlayer alloc] initWithData:dataAudio error:nil];
audioPlayer.delegate = self;
float sliderLength = [audioPlayer duration];