0
我開發了一款遊戲,但現在我正在嘗試爲其添加音樂。它曾在iPhone 3.5 Simulator中運行過一次,但現在每次運行它都會崩潰。這是怎麼回事?威脅1:信號Sigabrt錯誤
NSString *music = [[NSBundle mainBundle] pathForResource:@"Intro Soundtrack" ofType:@"mp3"];
audioPlayer1 = [[AVAudioPlayer alloc] initWithContentsOfURL:[NSURL fileURLWithPath:music] error:NULL];
audioPlayer1.delegate = self;
audioPlayer1.numberOfLoops = -1;
[audioPlayer1 play]; // Exception breakpoint says it is this line, but what's wrong here? I don't see anything wrong.
我得到線程1:信號SIGABRT錯誤。