Actually, it was both more and less tricky, because atilim wrote most of the code for me yesterday , and the mobileorchard code doesn't work without an extra line, given by some wiz on stackoverflow.
It's not really very satisfying, because it detects any noise rather than a blow, but I guess that working out what is a blow and what is noise requires a lot of sound analysis.
To install: Attached you will find a plugin CBMicBlow.mm file and a main.lua. Create a new project, and bring in this main.lua into the project. Add the CBMicBlow.mm file to your Xcode project. Run the project on your iPhone (microphone doesn't work on simulator I don't think), and run the Gideros Studio project.
(I think it's OK to post this code, as it's all over stackoverflow, but I'll take it down if it's not legit.)
Comments
http://mobileorchard.com/tutorial-detecting-when-a-user-blows-into-the-mic/
You could send an event from the plugin from the levelTimerCallback() method.
I'd have a go, but I'm not sure what the license is on using someone else's code, and uploading it as a Gideros plugin.
Likes: phongtt
Do you know how to use C or C++ or Objective C?
Are you writing for the iPhone or Android?
It's not really very satisfying, because it detects any noise rather than a blow, but I guess that working out what is a blow and what is noise requires a lot of sound analysis.
To install:
Attached you will find a plugin CBMicBlow.mm file and a main.lua.
Create a new project, and bring in this main.lua into the project.
Add the CBMicBlow.mm file to your Xcode project.
Run the project on your iPhone (microphone doesn't work on simulator I don't think), and run the Gideros Studio project.
(I think it's OK to post this code, as it's all over stackoverflow, but I'll take it down if it's not legit.)