Guest User

Untitled

a guest
Oct 16th, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.27 KB | None | 0 0
  1. NSURL *fileURL = [[NSBundle mainBundle] URLForResource:filename withExtension:nil];
  2. if (fileURL != nil)
  3. {
  4. SystemSoundID theSoundID;
  5. OSStatus error = AudioServicesCreateSystemSoundID((CFURLRef)fileURL, &theSoundID);
  6. if (error == kAudioServicesNoError)
  7. soundID = theSoundID;
  8. }
Add Comment
Please, Sign In to add comment