Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- NSURL *fileURL = [[NSBundle mainBundle] URLForResource:filename withExtension:nil];
- if (fileURL != nil)
- {
- SystemSoundID theSoundID;
- OSStatus error = AudioServicesCreateSystemSoundID((CFURLRef)fileURL, &theSoundID);
- if (error == kAudioServicesNoError)
- soundID = theSoundID;
- }
Add Comment
Please, Sign In to add comment