AudioServicesPlaySystemSound not playing sounds

后端 未结 6 1841
隐瞒了意图╮
隐瞒了意图╮ 2021-02-20 14:44

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

AudioServicesPlaySystemSound (soundFileObject);

But sometimes it is not playing.

6条回答
  •  孤独总比滥情好
    2021-02-20 15:24

    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.

提交回复
热议问题