Quote:
Originally Posted by Bobarino
Get the sound and make a button that triggers it. Was that what you were asking, or do you want code or something? Code wise, all you will need is too make an IBAction for when the button is pressed and use this code in it
Code:
NSString *path = [[NSBundle mainBundle] pathForResource:@"Whatever sound is called" ofType:@"mp3 or whatever it is"];
theAudio = [[AVAudioPlayer alloc] initWithContentsOfURL:[NSURL fileURLWithPath: path] error:NULL];
theAudio.delegate = self;
[theAudio play];
Thats pretty much all the code you'll need...
|
Hi Bobarino,
.. thanks for that - much appreciated, I was guessing that the ultra high frequency would be generated by some sort of tone generator - I hadn't thought of it as being a sound file but that makes more sense.
Now to find the sounds... :-)
Thanks again, and a happy new year to you and yours,
Jim