I implemented an audio player 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 will decrease slightly 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)
}
source
share