Skip to content

Instantly share code, notes, and snippets.

@onevcat
Created June 2, 2012 15:19
Show Gist options
  • Select an option

  • Save onevcat/2858803 to your computer and use it in GitHub Desktop.

Select an option

Save onevcat/2858803 to your computer and use it in GitHub Desktop.
error cast in arc conversion
NSURL *fileURL = [[NSBundle mainBundle] URLForResource:filename withExtension:nil];
if (fileURL != nil)
{
SystemSoundID theSoundID;
OSStatus error = AudioServicesCreateSystemSoundID((CFURLRef)fileURL, &theSoundID);
if (error == kAudioServicesNoError)
soundID = theSoundID;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment