私のアプリケーションがAVAudioPlayerで独自のサウンドを再生した後、別のアプリケーションで再生されるオーディオを再開する方法を探しています。今、音楽を聞いてアプリケーションを起動すると、音楽が一時停止し、自分のサウンドが再生されますが、バックグラウンドの音楽は再生されません。AVAudioPlayerでサウンドを再生した後にバックグラウンドオーディオを再開
myChime = [[AVAudioPlayer alloc] initWithContentsOfURL:[NSURL fileURLWithPath:[[NSBundle mainBundle] pathForResource:@"chime" ofType:@"mp3"]] error:nil];
myChime.delegate = self;
[myChime play];
// Here I am looking to resume the audio that the system was playing before my application played its sound. I have seen many applications do this such as, GPS apps that speak a voice direction and then resume the music.
ボイスオーバーが発生するまで音楽を再生し、音楽を停止し、「左に曲がる」音を再生し、iPodの再生を再開するまで、MotionX-GPSなどの多くのアプリケーションでBGMを再生できます。サウンドの再生が完了したら、以前のシステムのオーディオ再生を再開する方法を知りたい。 – wasabi
私もこの問題に直面しています。ここでサンプルコードをお勧めしますか?前もって感謝します。 – Gopinath
これを解決するために私を助けてもらえますか?私はこれで二日間過ごしましたか?お返事を待って。あなたの参照のための私の質問を参照してください:http://stackoverflow.com/questions/12475034/how-to-stop-and-resume-background-audio-from-iphone-app – Gopinath