我想要播放一个 .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