0
我想在使用MediaPlayer框架播放iPod音樂時使用AudioServicesPlaySystemSound(kSystemSoundID_Vibrate)振動iPhone,但播放音樂時無法使用振動功能。我可以使用以下代碼在iPod音樂的同時播放聲音,但振動似乎不起作用。如何在播放音樂時振動iPhone
[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!
有沒有人對我有任何建議?非常感謝!