0
嗨,我想用AVAudioPlayer和基礎播放很多聲音。 的代碼是這個播放多個聲音時出現Objective C錯誤
- (IBAction)pushButton19 {
NSString *path = [[NSBundle mainBundle] pathForResource:@"The Terminator" ofType:@"mp3"];
AVAudioPlayer* theAudio = [[AVAudioPlayer alloc] initWithContentsOfURL:[NSURL fileURLWithPath:path] error:NULL];
theAudio.delegate = self;
[theAudio play];
}
- (IBAction)pushButton20 {
NSString *path = [[NSBundle mainBundle] pathForResource:@"The Wizard of Oz" ofType:@"mp3"];
AVAudioPlayer* theAudio = [[AVAudioPlayer alloc] initWithContentsOfURL:[NSURL fileURLWithPath:path] error:NULL];
theAudio.delegate = self;
[theAudio play];
}
上線theAudio.delegate = self;
它說
類*沒有實現 協議
以及
語義問題分配t ØID 從 不兼容的類型的MainView *
什麼我需要做修復它和u能告訴我正確的代碼作爲這個我是個菜鳥?