AVAudioplayer: Volume drops after couple of seconds

江枫思渺然 提交于 2019-12-23 05:10:16

问题


I've implemented an audioplayer on iOS 10.2.1 with XCode Version 8.2.1 (8C1002) on Mac OS Sierra 10.12.3

When the song starts playing the volume drops quite a bit after a couple of seconds.

Has anyone experienced such an effect?

 do {
     myAudioPlayer = try AVAudioPlayer(contentsOf: url!)
     myAudioPlayer.prepareToPlay()
     myAudioPlayer.volume = 1.0
 } catch  {
     print(error)
 }

来源:https://stackoverflow.com/questions/43076669/avaudioplayer-volume-drops-after-couple-of-seconds

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!