【发布时间】:2011-01-17 10:58:38
【问题描述】:
我在使用 MediaPlayer 框架播放 iPod 音乐时尝试使用 AudioServicesPlaySystemSound(kSystemSoundID_Vibrate) 振动 iPhone,但在播放音乐时我无法让振动工作。我可以使用以下代码在播放 iPod 音乐的同时播放声音,但振动似乎不起作用。
[musicPlayerController play]; // play the iPod music
AudioServicesPlaySystemSound(mySoundFileID); // this function works fine -- it plays an aif sound while the music is playing
AudioServicesPlaySystemSound(kSystemSoundID_Vibrate); // But this line doesn't do anything!
有人对我有什么建议吗?非常感谢!
【问题讨论】:
标签: iphone vibration iphone-vibrate