title: How to vibrate iPhone while playing music
body: <p>I am trying to vibrate the iPhone using AudioServicesPlaySystemSound(kSystemSoundID_Vibrate) while playing iPod music with the MediaPlayer framework, but I can't get the vibrate to work while the music is playing. I can play a sound at the same time as the iPod music using the following code, but the vibrate doesn't seem to work.</p>
  
  <pre><code>[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!
  </code></pre>
  
  <p>Does anyone have any suggestions for me? Thanks a lot!</p>