"Play Sound Effect"

Mon 11 May 2009

#import "SoundEffect.h"

 

// init sound

NSBundle *mainBundle = [NSBundle mainBundle];

SoundEffect *tapSound = [[SoundEffect alloc] initWithContentsOfFile:[mainBundle pathForResource:@"tap_snd" ofType:@"caf"]]; 

 

 // play sound

 [tapSound play];

 

SoundEffect.m (1.13 kb)

SoundEffect.h (263.00 bytes)