How do I fastforward using AVAudioplayer while hearing the music?

孤者浪人 提交于 2019-12-02 12:20:22

Have a look at the rate property on AVAudioPlayer

This property’s default value of 1.0 provides normal playback rate. The available range is from 0.5 for half-speed playback through 2.0 for double-speed playback.

To set an audio player’s playback rate, you must first enable rate adjustment as described in the enableRate property description.

You could change the rate for a certain amount of time when a button is pressed to simulate fast-forwarding

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