开发者

How to use AVAudioPlayer to play a playlist in iPhone/iPad

开发者 https://www.devze.com 2023-01-07 02:52 出处:网络
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)

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.

0

精彩评论

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