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
Post a Comment