-(void) play_shake_sound_male
{
    NSString *path = [[NSBundle mainBundle] pathForResource:@"shake_sound_male" ofType:@"wav"];
    if (path) {
        //注册声音到系统      在GDB模式下此句代码,即使不舍断点,也总是停下,继续后正常运行;在LLDB 模式下没有这个问题
        AudioServicesCreateSystemSoundID((CFURLRef)[NSURL fileURLWithPath:path],&shake_sound_male_id);
    }
    AudioServicesPlaySystemSound(shake_sound_male_id);   //播放注册的声音
}

 

相关文章:

  • 2021-12-08
  • 2022-02-06
  • 2022-02-14
  • 2022-12-23
  • 2022-12-23
  • 2021-06-17
  • 2021-06-28
猜你喜欢
  • 2021-12-29
  • 2022-12-23
  • 2021-08-06
  • 2021-04-18
  • 2021-08-04
  • 2021-09-03
  • 2022-12-23
相关资源
相似解决方案