iter
iter

Reputation: 4313

iPhone does not vibrate while recording

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.

Upvotes: 7

Views: 1826

Answers (2)

iter
iter

Reputation: 4313

The answer is that Apple doesn't allow this. All audio sessions that allow recording turn off vibration.

Upvotes: 8

hotpaw2
hotpaw2

Reputation: 70733

Do you need to vibrate and record at the same time?

If you don't, you can stop your audio unit when it's time to vibrate, change the audio session type to live audio, play the vibrate system sound thru audio services, then switch the session back to play and record, and restart your audio unit recording again.

Upvotes: 2

Related Questions