Guest User

Untitled

a guest
Jun 24th, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. SystemSoundID topClick;
  2.  
  3. NSBundle* bundle = [NSBundle mainBundle];
  4. NSString *topClickFile = [bundle pathForResource:@"top_click" ofType:@"aiff"];
  5.  
  6. AudioServicesPlaySystemSound(topClick);
  7.  
  8. NSString *graffitiSprayFile = [bundle pathForResource:@"sound_effect" ofType:@"aiff"];
  9. AVAudioPlayer* sprayAudio = [[AVAudioPlayer alloc] initWithContentsOfURL:[NSURL fileURLWithPath:graffitiSprayFile] error:NULL];
  10. sprayAudio.delegate = self;
  11. [sprayAudio prepareToPlay];
  12. [sprayAudio setNumberOfLoops:999];
Add Comment
Please, Sign In to add comment