开发者

Playing music from iPod library with no delay

开发者 https://www.devze.com 2023-03-06 21:56 出处:网络
I am trying to play audio files from the iPod library without any delay from calling \'play\' to when the actual music starts.

I am trying to play audio files from the iPod library without any delay from calling 'play' to when the actual music starts. I tried using the MPMusicPlayerController, but sometimes there is a delay, even a couple of seconds. I 开发者_运维技巧also tried calling 'play' and 'pause' before the actual play, but it didn't help.

I tried the same using AVPlayer, but the same problem. When I tried using AVAudioPlayer and calling its 'prepareToPlay' it worked great! absolutely no delay, but the AVAudioPlayer cannot play music from the iPod library.

Unfortunately, nor the AVPlayer or the MPMusicPlayerController have this method.

Any help would be appreciated.

Gili.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号