【发布时间】:2015-12-20 10:21:40
【问题描述】:
我正在尝试播放 .amr 文件。
func prepareAudio() {
do {
self.audioPlayer = try AVAudioPlayer(contentsOfURL: NSURL(fileURLWithPath: NSBundle.mainBundle().pathForResource("welcome", ofType: "amr")!))
self.audioPlayer.play()
} catch {
print("Error")
}
}
输出
ERROR: >aq> 327: AudioConverterNew from AudioQueueNew returned 'fmt?'
io: 1 ch, 8000 Hz, Float32
client: 1 ch, 8000 Hz, 'samr' (0x00000000) 0 bits/channel, 0 bytes/packet, 2400 frames/packet, 0 bytes/frame
【问题讨论】:
-
AVPlayer 不再支持 AMR:stackoverflow.com/questions/24103790/…
标签: ios swift avaudioplayer