문제

Using AVAudioPlayer we can play more than 1 song in a loop using this method:

- (void)audioPlayerDidFinishPlaying:(AVAudioPlayer *)player successfully:(BOOL)flag

to play the next song. But is it possible to identify the AVAudioPlayer instance since at a single time there are many AVAudioPlayer playing separate playlist in a app.

도움이 되었습니까?

해결책

The player (first argument) from

- (void)audioPlayerDidFinishPlaying:(AVAudioPlayer *)player successfully:(BOOL)flag  

is the AVAudioPlayer, that you are looking for.

So you can check it:

if ([player isEqual:self.audioPlayer1])
{
    //Do something
} 
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top