The program AVAudioPlayer to play a sound problem.

The two problem


1 program with AVAudioPlayer to play a sound, if the player in music (other music player is the same), the concert was interrupted by the system.. How to set the playback sound not interrupt the learning music? I tried some program when listening to music in the background, using the music player can also play music, there is no conflict.


2 and I saw the music player, the program calls AVAudioPlayer would interrupt the music playback songs, but when I stop playing the program shut down or AVAudioPlayer. Music player will automatically continue playing the song. Can I get to the audioPlayerEndInterruption of the event, but I in this call inside [player play] seems useless, can not continue to play (Note: the procedure is in the background.).


- (void)audioPlayerEndInterruption:(AVAudioPlayer *)player withOptions:(NSUInteger)flags
{
[self.audioPlayer play];
NSLog(@"audioPlayerEndInterruption2");
}

Started by Betty at December 21, 2016 - 2:04 PM

IOS, nobody can answer the question. .

Posted by Betty at January 01, 2017 - 2:40 PM