如何使用Extended Audio File Services: ExtAudioFileRead对音频文件执行同步、顺序读取操作。
NSString *filePath = [[NSBundle mainBundle] pathForResource:@"theme"
ofType:@"mp3"];
NSURL *fileURL = [[NSURL alloc] initFileURLWithPath:filePath];
audioPlayer = [[AVAudioPlayer alloc]
initWithContentsOfURL:fileURL error:nil];
[fileURL release];如何在主题音频文件上执行同步、顺序读取操作。目前有AVFoundation.Framework,我也应该添加CoreAudio.Framework吗?
发布于 2012-02-28 23:41:30
要使用扩展音频文件服务,您需要链接到AudioToolbox.framework
使用此API打开和读取文件相当复杂。here和Documentation中有一些很好的信息。
就我而言,我发现AudioToolbox.framework中的头文件具有最好的文档。请参阅ExtAudioFile.h
https://stackoverflow.com/questions/9484772
复制相似问题