播放提示音

Posted ZHZMAREN

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了播放提示音相关的知识,希望对你有一定的参考价值。

 // 1.播放提示音
    SystemSoundID soundID;
    NSString *strSoundFile = [[NSBundle st_qrcodeControllerBundle] pathForResource:@"st_noticeMusic" ofType:@"wav"];
    if (strSoundFile)
        AudioservicesCreateSystemSoundID((__bridge CFURLRef)[NSURL fileURLWithPath:strSoundFile],&soundID);
   
     AudioServicesPlaySystemSound(soundID);
 // 1.播放提示音
    SystemSoundID soundID;
    NSString *strSoundFile = [[NSBundle st_qrcodeControllerBundle] pathForResource:@"st_noticeMusic" ofType:@"wav"];
    if (strSoundFile)
        AudioServicesCreateSystemSoundID((__bridge CFURLRef)[NSURL fileURLWithPath:strSoundFile],&soundID);
   
     AudioServicesPlaySystemSound(soundID);

以上是关于播放提示音的主要内容,如果未能解决你的问题,请参考以下文章