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
.
相关问题
- CALayer - backgroundColor flipped?
- Core Data lightweight migration crashes after App
- How can I implement password recovery in an iPhone
- how do you prevent page scroll in textarea on mobi
- Custom UITableview cell accessibility not working
相关文章
- Could I create “Call” button in HTML 5 IPhone appl
- Unable to process app at this time due to a genera
- How do you detect key up / key down events from a
- “Storyboard.storyboard” could not be opened
- Open iOS 11 Files app via URL Scheme or some other
- Can keyboard of type UIKeyboardTypeNamePhonePad be
- Can not export audiofiles via “open in:” from Voic
- XCode 4.5 giving me “SenTestingKit/SenTestKit.h” f
The answer is that Apple doesn't allow this. All audio sessions that allow recording turn off vibration.
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.