ios播放声音

来源:互联网 发布:linux socket编程教程 编辑:程序博客网 时间:2024/04/30 14:12
 NSString *path = [[NSBundle mainBundle] pathForResource:@"dealcard" ofType:@"m4a"];
    NSURL *url = [NSURL fileURLWithPath:path];
    SystemSoundID outSystemSoundID;
    AudioServicesCreateSystemSoundID((__bridge CFURLRef)url,&outSystemSoundID);
    AudioServicesPlaySystemSound(outSystemSoundID);
原创粉丝点击