2
是否可以在不停止iPod音樂的情況下播放應用程序中的聲音?是否可以在不停止iPod音樂的情況下播放聲音?
現在,我使用以下,但它停止的iPod音樂
soundPath =[[NSBundle mainBundle] pathForResource:@"mySound" ofType:@"mp3"];
soundURL = [NSURL fileURLWithPath:soundPath];
mySound = [[AVAudioPlayer alloc] initWithContentsOfURL:soundURL error:nil];
[mySound prepareToPlay];
然後
[mySound play];
這對我來說很好,對於我來說很少有大驚小怪。 –