【发布时间】:2012-11-08 07:11:51
【问题描述】:
我正在使用 AVPlayer 从服务器播放本地 .mp3 文件和音频流。 我也想播放本地 .pcm 文件。
NSArray *paths=NSSearchPathForDirectoriesInDomains(NSDocumentDirectory
, NSUserDomainMask
, YES);
NSString * voiceFile = [[paths objectAtIndex:0] stringByAppendingPathComponent:@"OutPut.pcm"];
但它没有用。我遇到了未知错误。
看来AudioQueue可以正确播放.pcm了。
但是有没有一种示例方法可以让 AVPlayer 像 .mp3 一样直接播放 .pcm?
【问题讨论】:
标签: iphone objective-c ios avplayer pcm