I'm having trouble with the function audioPlayerDidFinish playing. I have added the AVAudioPlayerDelegate to my view controller class and defined the function. When I call the function I get the error "Cannot convert value of type 'AVAudioPlayer.Type' to expected argument type" What am I doing wrong? Let me know if I need to add more code for you to see.
func buttonPressed() {
if currentSound == sound {
currentSound = "None"
activateBlankCircle()
audioPlayer.stop()
}
else {
currentSound = sound
audioPlayer.prepareToPlay()
activateRedCircle()
playSound()
audioPlayerDidFinishPlaying(AVAudioPlayer, successfully: Bool)
//Cannot convert value of type 'AVAudioPlayer.Type' to expected argument type
}
}