NSString *newAudioFile = [[NSBundle mainBundle] pathForResource:@"t5" ofType:@"wav"];
NSError *error;
AVAudioPlayer player= [[AVAudioPlayer alloc] initWithContentsOfURL:[NSURL fileURLWithPath:newAudioFile] error:&error];
[player setDelegate:self];
[player prepareToPlay];
[player play];
沒有留言:
張貼留言