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;
}
このトピックCDSoundSource
から恥知らずにコードを盗んだので、それがを初期化する正しい方法であるかどうかは正確にはわかりません。CDAudioManager Class Referenceをご覧ください。
これがあなたを正しい方向に向けるのに役立つことを願っています.