AudioServicesPlaySystemSound除了AudioServicesPlayAlertSound之外不会做任何事情,使iPhone振动。AudioServicesPlaySystemSound振动有效,但没有声音
AudioServicesCreateSystemSoundID返回成功。我正在开发运行iOS4的iPhone3G。
任何想法? 彼得
=====
下面是如何创建的声音:
NSString *sndPath = [[NSBundle mainBundle] pathForResource:@"first_touch" ofType:@"wav" inDirectory:@"/"];
CFURLRef sndURL = (CFURLRef)[[NSURL alloc] initFileURLWithPath:sndPath];
int e = AudioServicesCreateSystemSoundID(sndURL, &_firstTouch); // TODO: call 'AudioServicesDisposeSystemSoundID'
这就是我玩谁:
AudioServicesPlayAlertSound(_firstTouch);