AudioServicesPlaySystemSound 不播放声音 [英] AudioServicesPlaySystemSound not playing sounds

查看:69
本文介绍了AudioServicesPlaySystemSound 不播放声音的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 AudioToolBox 播放一个小的 .wav 文件.

I am playing a small .wav file using the AudioToolBox.

AudioServicesPlaySystemSound (soundFileObject);

但有时它不播放.

是什么原因?

推荐答案

如果您在模拟器中,请确保在 System Prefrences → Sound 中,播放用户界面音效"没有关闭.如果您在设备上,请检查振铃器开关是否未设置为静音.

If you're in the Simulator, make sure that in System Prefrences → Sound, that "Play user interface sound effects" is not turned off. If you're on the device, check that the ringer switch is not set to silent.

这篇关于AudioServicesPlaySystemSound 不播放声音的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆