Skip to content

Instantly share code, notes, and snippets.

@nummi
Created September 9, 2010 22:43
Show Gist options
  • Save nummi/572730 to your computer and use it in GitHub Desktop.
Save nummi/572730 to your computer and use it in GitHub Desktop.
NSString *filePath = [[NSBundle mainBundle] pathForResource:@"rimshot" ofType:@"aif"];
NSError* err;
AVAudioPlayer *player = [[AVAudioPlayer alloc] initWithContentsOfURL:[NSURL URLWithString:filePath] error:&err];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment