我使用AVFoundation在swift中创建了一个声音播放器。播放歌曲结束后,我正在尝试开始播放下一首歌曲。我试图实现这段代码if(audioPlayer.currentTime>=audioPlayer.duration){varrecentSong=songPlaylist[selectedSongNumber+1]audioPlayer=AVAudioPlayer(contentsOfURL:NSURL(fileURLWithPath:NSBundle.mainBundle().pathForResource(recentSong,ofType:"mp3")!),error: