Hi there programming forum.
I am currently writing an app which plays a sound when a picture is tapped or hit or whatever. The code I am using is here
What am I doing wrong and how do I get this to work
I am currently writing an app which plays a sound when a picture is tapped or hit or whatever. The code I am using is here
Code:
- (IBAction)HighFive{
//Get the filename of the sound file:
NSString *path = [NSString stringWithFormat:@"%@%@",
[[NSBundle mainBundle] resourcePath],
@"/highfive.mp3"];
//declare a system sound id
SystemSoundID ;soundID; < 'soundID' undeclared
//Get a URL for the sound file
NSURL *filePath = [NSURL fileURLWithPath:path isDirectory:NO];
//Use audio sevices to create the sound
AudioServicesCreateSystemSoundID((CFURLRef)filePath, &soundID);
//Use audio services to play the sound
AudioServicesPlaySystemSound(soundID);
}
What am I doing wrong and how do I get this to work