AVFoundation框架中录音和播放音效的基本使用
2017-03-23 本文已影响3人
Waisti
//停止录音 调用recoder的stop方法
@IBAction func stop(_ sender: UIButton) {
recoder?.stop()
self.timer?.invalidate()
self.timer = nil
}
播放短音效: (要把音效文件xxx放到项目中,alert为震动效果)
//停止录音 调用recoder的stop方法
@IBAction func stop(_ sender: UIButton) {
recoder?.stop()
self.timer?.invalidate()
self.timer = nil
}
播放短音效: (要把音效文件xxx放到项目中,alert为震动效果)