ho开发者_开发知识库w to know which song is playing in avaudioplayer
The "url" property of AVAudioPlayer returns the file path of the file currently being played.
I have a feeling what you're actually asking is how to find out which song is playing in the system though. In which case you should use nowPlayingItem in MPMusicPlayerController. This shows, for example, which song is playing in iTunes.
just get its property .url:
//NO: your.AVAudioPlayer.url;
EDIT:
yourAVAudioPlayer.url; //
精彩评论