views:

49

answers:

0

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.

[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!

Does anyone have any suggestions for me? Thanks a lot!