The following Code is from Dr.David Fisher from Rose Hulman College. He has iOS video Lectures on itunes. Great great Lectures!
//Create a System sound struct soundID
//Get a path to our sound resource
//Connect the system sound ID to that resource
SystemSoundID soundID;
NSString *path = [[NSBundle mainBundle] pathForResource:@"sound file name" ofType:@"soundfiletype"];
AudioServicesCreateSystemSoundID((CFURLRef)[NSURL fileURLWithPath:path], &soundID);
AudioServicesPlaySystemSound (soundID);
No comments:
Post a Comment