I’d like to do an application that detects if someone is blowing/whistling into an iPhone mic.
Something like Ocarina by Smule.
Any code examples / tutorials on that subject?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
AVAudioRecordershould do the trick for you. More info here on peak power: http://developer.apple.com/iphone/library/documentation/AVFoundation/Reference/AVAudioRecorder_ClassReference/Reference/Reference.html#//apple_ref/occ/instm/AVAudioRecorder/peakPowerForChannel:Here’s a good example of how to use it, paying close attention to peak input: http://www.mobileorchard.com/tutorial-detecting-when-a-user-blows-into-the-mic/