Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SystemSoundID topClick;
- NSBundle* bundle = [NSBundle mainBundle];
- NSString *topClickFile = [bundle pathForResource:@"top_click" ofType:@"aiff"];
- AudioServicesPlaySystemSound(topClick);
- NSString *graffitiSprayFile = [bundle pathForResource:@"sound_effect" ofType:@"aiff"];
- AVAudioPlayer* sprayAudio = [[AVAudioPlayer alloc] initWithContentsOfURL:[NSURL fileURLWithPath:graffitiSprayFile] error:NULL];
- sprayAudio.delegate = self;
- [sprayAudio prepareToPlay];
- [sprayAudio setNumberOfLoops:999];
Add Comment
Please, Sign In to add comment