本文介绍了录制时iPhone不会振动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在修改AurioTouch示例。我想振动手机以响应特定的声音输入。我可以检测输入和 printf
它们,但 AudioServicesPlaySystemSound(kSystemSoundID_Vibrate)
在会话< kAudioSessionCategory_PlayAndRecord
。
I am modifying the AurioTouch example. I want to vibrate the phone in response to particular sound inputs. I can detect the inputs and printf
them, but AudioServicesPlaySystemSound(kSystemSoundID_Vibrate)
doesn't do anything while the session is kAudioSessionCategory_PlayAndRecord
.
推荐答案
答案是Apple不允许这样做。允许录制的所有音频会话都会关闭振动。
The answer is that Apple doesn't allow this. All audio sessions that allow recording turn off vibration.
这篇关于录制时iPhone不会振动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!