views:

57

answers:

1

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?

+2  A: 

AVAudioRecorder should 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/

iWasRobbed
thanks. that is exactly what I was looking for!
Merlin
not a problem, good luck
iWasRobbed