SimpleAudioEngine
효과에 대한 isBackgroundMusicPlaying
같은 방법을 가지고 있지 않습니다,하지만 당신은 그런 구현 콜백 BOOL
라는 isPlaying를 저장하고 CDSoundSource
CDSoundSource* currentSound = [[CDAudioManager sharedManager] audioSourceForChannel:kASC_Right];
[currentSound load:audioFile];
currentSound.delegate = self;
currentSound.backgroundMusic = NO;
isPlaying = YES;
[currentSound play];
를 사용할 수 있습니다
- (void) cdAudioSourceDidFinishPlaying:(CDLongAudioSource *) audioSource {
isPlaying = NO;
}
그렇게하지를 this topic의 코드를 뻔뻔하게 도용했기 때문에 그것이 정확히 CDSoundSource
을 초기화하는 올바른 방법인지 정확하게 알고 있어야합니다. 어쩌면 당신은 좀 봐야한다 CDAudioManager Class Reference
이것이 당신을 바른 방향으로 당신을 가리키는 데 도움이되기를 바란다.