How to use AVAudioPlayer to play a playlist in iPhone/iPad
Please I know how to play a sound in AVAudioPlayer but I would like to know how to give it a list of on-disk files to play one after the other (play list)
Anyo开发者_如何学JAVAne has any idea?
You have to manage this by yourself, using the 'audioPlayerDidFinishPlaying
' method to know when the current song is over, and when to start a new one.
The Apple "AddMusic" sample program does exactly this, setting up a playlist of audio files using MPMusicPlayerController and AVAudioPlayer to do most of the work.
精彩评论