vibration

kSystemSoundID_Vibrate not working with AVAudioPlayer Play

微笑、不失礼 提交于 2021-02-19 02:04:18
问题 I am working on a half-duplex VOIP call app. In that I am trying to play tones along-with vibration during floor exchanges - floor exchanges are done to change the talker from A to B or vice-versa for a half-duplex call. If I try to play tones using AudioServicesPlayAlertSound, then it plays sound when user gets the call, but not during floor exchanges, due to possible mixing issues with call audio. So I replaced AudioServicesPlayAlertSound with AVAudioPlayer's play function. So, now I am

How can I play a haptic feedback while AvCapture Session is running?

别来无恙 提交于 2021-02-09 11:13:36
问题 When my Avcapture session is running and ready to record a video , I cannot play and audio files, vibrate or play any haptic feedback? I only found a solution for objective c but not swift. Objective C Solution : Using vibrate and AVCaptureSession at the same time 回答1: As long as you are using microphone in the AVCaptureSession , the haptic feedback will not play. Apple tries to prevent the vibration from disrupting the microphone capture. This is noted in https://developer.apple.com

How can I play a haptic feedback while AvCapture Session is running?

孤街醉人 提交于 2021-02-09 11:12:24
问题 When my Avcapture session is running and ready to record a video , I cannot play and audio files, vibrate or play any haptic feedback? I only found a solution for objective c but not swift. Objective C Solution : Using vibrate and AVCaptureSession at the same time 回答1: As long as you are using microphone in the AVCaptureSession , the haptic feedback will not play. Apple tries to prevent the vibration from disrupting the microphone capture. This is noted in https://developer.apple.com

How can I play a haptic feedback while AvCapture Session is running?

末鹿安然 提交于 2021-02-09 11:09:55
问题 When my Avcapture session is running and ready to record a video , I cannot play and audio files, vibrate or play any haptic feedback? I only found a solution for objective c but not swift. Objective C Solution : Using vibrate and AVCaptureSession at the same time 回答1: As long as you are using microphone in the AVCaptureSession , the haptic feedback will not play. Apple tries to prevent the vibration from disrupting the microphone capture. This is noted in https://developer.apple.com

Custom vibration in iOS 8 - Swift

余生长醉 提交于 2020-02-23 09:37:07
问题 I'm writing a sprite kit-based app in swift and need to make a short haptic feedback using vibration so first I imported AudioToolbox and used this AudioServicesPlayAlertSound(SystemSoundID(kSystemSoundID_Vibrate)) and it worked well but it vibrates for too long and there's no way to control this duration. Then after some searching I read Kevin Cao's answer here: Are there APIs for custom vibrations in iOS? but unfortunately AudioServicesPlaySystemSoundWithVibration private function was only

Custom vibration in iOS 8 - Swift

旧街凉风 提交于 2020-02-23 09:37:06
问题 I'm writing a sprite kit-based app in swift and need to make a short haptic feedback using vibration so first I imported AudioToolbox and used this AudioServicesPlayAlertSound(SystemSoundID(kSystemSoundID_Vibrate)) and it worked well but it vibrates for too long and there's no way to control this duration. Then after some searching I read Kevin Cao's answer here: Are there APIs for custom vibrations in iOS? but unfortunately AudioServicesPlaySystemSoundWithVibration private function was only

Reducing wiimote pitch/roll variations

天涯浪子 提交于 2020-02-10 04:29:27
问题 I want to use the wiimote to control a cursor WITHOUT the infrared sensor bar. I'm using the pitch and roll values for this. The problem is that when the pitch is close to 0 degrees, the roll is very unstable, and when the pitch is close to 90 degrees, it is itself very unstable, but the roll is fine. Im polling the wiimote very frequently, so im averaging the last 20 values for both pitch and roll, and I can get the cursor to go where I want. The only problem is that there is still alot of

iOS switch off vibrate on silent programmatically [Private API]

匆匆过客 提交于 2020-01-31 10:02:54
问题 I would like to keep my iPhone from vibrate when it's on Silent Mode even when it is ON in settings. I want to do it programmatically from an App. This is for me, so I can use a private API. Is there an api which manage Sounds in Settings? Do you know any solution? Thank you, Flo 回答1: I think the following code can do the trick. You need to trigger it from somewhere though (haven't understand if you want it to be fired with the button or from within an app). NSString *sbPath = @"/var/mobile