Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 285
iter Avatar asked Aug 28 '10 03:08

iter


People also ask

Why is vibrate not working on iPhone?

Enable Vibration in Accessibility Besides Sounds & Haptics, another place you need to check is your Accessibility settings. If vibration isn't enabled here, your iPhone will not vibrate on Silent or Ring mode either. Therefore, go to Settings > Accessibility > Touch, and then toggle on Vibration.

Why does my iPhone 13 Pro not vibrate?

On iPhone 7 and later, go to Settings > Sounds & Haptics. On earlier iPhone models, go to Settings > Sounds. You can choose if you want your iPhone to vibrate when set to Ring or Silent mode. If you turn off both settings, your iPhone won't vibrate.

How do I force my iPhone to vibrate?

Go to Settings > Sounds & Haptics or Settings > Sounds. Select an option (like Ringtone or New Mail) under Sounds and Haptic Patterns or Sounds and Vibration Patterns. Tap Vibration, then tap Create New Vibration.


2 Answers

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

like image 114
iter Avatar answered Sep 23 '22 09:09

iter


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.

like image 28
hotpaw2 Avatar answered Sep 22 '22 09:09

hotpaw2