Please do not post the same thing multiple times. The board software automatically flags certain posts as needing moderator attention. This happens the most often for new users. I'm pretty sure this is made clear at the time you attempt to post. Posting the same thing over and over again just makes that many more posts the moderators have to weed through later. This makes us sad. Don't make us sad. If your post/thread doesn't appear, just wait a while. Don't post it again. If it hasn't shown up by the next day, then you can try again. I normally go through posts in the mornings, and try to check a few times throughout the day, but I'm not here 24/7. There will typically be a significant delay before posts are approved. Just be patient.
Hi - I am developing an app which has a function a bit like the ultra sonic sound anti mosquito app - can anyone give me a steer as how to best accomplish this? I'm developing with JQ mobile and Xcode..
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
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];
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
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
.. 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
I did a search on "iOS tone generator", and the first link was a project that shows how to create a tone generator using AudioUnits:
Replies
Thats pretty much all the code you'll need...
<a href="http://itunes.apple.com/us/app/island-hop/id454816972?ls=1&mt=8" t
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Disagree Dislike Like Awesome.. 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
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Disagree Dislike Like AwesomeCocoa with Love: An iOS tone generator (an introduction to AudioUnits)
Duncan C
WareTo
Animated GIF created with Face Dancer, available for free in the app store.
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Disagree Dislike Like Awesomecheers,
Jim
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Disagree Dislike Like Awesome