Play music from iPod library without delay

I am trying to play audio files from the iPod library without any delay from calling “play” to the start of real music. I tried to use MPMusicPlayerController, but sometimes there is a delay, even a couple of seconds. I also tried calling “play” and “pause” until the actual game, but that didn't help.

I tried the same using AVPlayer but with the same problem. When I tried using AVAudioPlayer and called it “prepareToPlay”, it will work great! absolutely no delay, but AVAudioPlayer cannot play music from the iPod library.

Unfortunately, this method does not support AVPlayer or MPMusicPlayerController.

Any help would be appreciated.

Gili.

+3
source share

All Articles