Help stopping audio using AVAudioPlayer
问题 Alright I have two problems. I'm using AVAudioPlayer to play a simple audio file in .caf format. What I'm trying to do is have a play and pause button. Here is a sample of a simple IBAction to play the audio from a button. - (IBAction) clear { NSString *path = [[NSBundle mainBundle] pathForResource:@"clear" ofType:@"caf"]; AVAudioPlayer* myAudio=[[AVAudioPlayer alloc] initWithContentsOfURL:[NSURL fileURLWithPath:path] error:NULL]; myAudio.delegate = self; myAudio.volume = 1.0; myAudio