简体   繁体   中英

What is the difference between AVAudioPlayer and MPMusicPlayerController?

It looks like both of them can play audio file. What is the difference between AVAudioPlayer and MPMusicPlayerController?

Welcome any comment

Thanks interdev

Read the class reference

MPMusicPlayerController: http://developer.apple.com/iphone/library/documentation/mediaplayer/reference/MPMusicPlayerController_ClassReference/Reference/Reference.html

You use an MPMusicPlayerController object, or music player, to play media items from the iPod library.

AVAudioPlayer: http://developer.apple.com/iphone/library/documentation/AVFoundation/Reference/AVAudioPlayerClassReference/Reference/Reference.html

An instance of the AVAudioPlayer class, called an audio player, provides playback of audio data from a file or memory.

Apple recommends that you use this class for audio playback unless you are playing audio captured from a network stream or require very low I/O latency.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM