连着真机调,没有发现异常啊
 NSString *file = [[NSBundle mainBundle]pathForResource:@"right" ofType:@"wav"];
    
    AudioServicesCreateSystemSoundID((__bridge CFURLRef) [NSURL fileURLWithPath:file],&systemsoundID);
    
    NSString *filewrong = [[NSBundle mainBundle]pathForResource:@"error" ofType:@"wav"];
    
    AudioServicesCreateSystemSoundID((__bridge CFURLRef) [NSURL fileURLWithPath:filewrong],&systemsoundID_wrong);对应的调试窗口

解决方案 »

  1.   

    折腾了一个上午,还是没有弄出声音来,不过,基本可以确定,问题在手机这边。因为我从网上下载的某书的例子,也是手机上没有声音,模拟器有声音,我想别人编书总不会弄错,因此,问题还在我的手机这里。
    但是,我看网上也有其他人有这种现象:
    http://www.cocoachina.com/bbs/read.php?tid-42803.html
    无法解决,暂时放弃了,不用系统声音。换播放器。
      

  2.   

    - (void)applicationDidFinishLaunching:(UIApplication *)application

    [[AVAudioSession sharedInstance] setCategory:AVAudioSessionCategoryPlayback error:nil];