ios - Add background thread that Vibrate's the phone when called -


i take on audio input analyze note being played instrument. takes on main thread. how create thread run when note gets played on tune can vibrate phone?

this viewdidload:

- (void) viewdidload  {     [super viewdidload];      [self vibrate];      pthread_t buf_update_thread;      // setup audio input     ctaudiobuffer * audioinput = initaudio(); // not allow vibrate      animation = [[animation alloc] init];      [animation init:(uiview *) self.view];      pthread_create(&buf_update_thread, null, &analyzedata, audioinput);      [nstimer scheduledtimerwithtimeinterval:redraw_timer target:self selector:@selector(updatectdisplay:) userinfo: nil repeats:yes]; } 


Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

jsf - How to ajax update an item in the footer of a PrimeFaces dataTable? -

django - CSRF verification failed. Request aborted. CSRF cookie not set -