0
AVAudioplayer를 사용하는 Iam과 버튼을 누르면 몇 초 동안 음악을 일시 중지하고 6 초 후에 아무 버튼도 누르지 않고 음악을 다시 시작하고 싶습니다. 그게 가능한가? 그렇다면 어떻게 할 수 있습니까? 여기 내 코드의 샘플은 다음과 같습니다몇 초 동안 AVAudioplayer 일시 중지
나는 잘 모릅니다NSString *soundPath2 =[[NSBundle mainBundle] pathForResource:@"background" ofType:@"wav"];
NSURL *soundURL2 = [NSURL fileURLWithPath:soundPath2];
NSError *error2 = nil;
self.backgroundMusic = [[AVAudioPlayer alloc] initWithContentsOfURL:soundURL2 error:&error2];
self.backgroundMusic.numberOfLoops = 9;
[self.backgroundMusic prepareToPlay];
[self.backgroundMusic play];