0
這段代碼有什麼問題?我以前用過,但現在我得到這些警告...播放聲音問題iPhone?
警告:傳遞從兼容的指針類型「AudioServicesCreateSystemSoundID」參數2
警告:傳遞「AudioServicesPlaySystemSound」的參數1時將整數沒有投的指針
-(void)playfireSound{
NSString *path = [[NSBundle mainBundle] pathForResource:@"fireSound" ofType:@"wav"];
NSURL *url = [NSURL fileURLWithPath:path];
AudioServicesCreateSystemSoundID((CFURLRef) url, &fireSound);
AudioServicesPlaySystemSound(fireSound);
}
也許顯示fireSound的聲明? – Eiko 2010-09-04 14:50:02