title: Android Audio Analysis in Real-time
body: <p>I have searched for this online, but am still a bit confused (as I'm sure others will be if they think of something like this). I'd like to preface by saying that this is <em>not</em> for homework and/or profit.</p>
  
  <p>I wanted to create an app that could listen to your microwave as you prepare popcorn. It would work by sounding an alarm when there's a certain time interval between pops (say 5-6 seconds). Again, this is simply a project to keep me occupied - not for a class.</p>
  
  <p>Either way, I'm having trouble trying to figure out how to analyze the audio intake in real-time. That is, I need a way to log the time when a "pop" occurs. So that you guys don't think I didn't do any research into the matter, I've checked out <a href="https://stackoverflow.com/questions/2257075/real-time-audio-processing-in-android">this</a> SO question and have extensively searched the <a href="http://developer.android.com/reference/android/media/AudioRecord.html#read%28short%5B%5D,%20int,%20int%29" rel="nofollow noreferrer">AudioRecord</a> function list.</p>
  
  <p>I'm thinking that I will probably have to do something with one of the versions of <a href="http://developer.android.com/reference/android/media/AudioRecord.html#read%28short%5B%5D,%20int,%20int%29" rel="nofollow noreferrer">read()</a> and then compare the recorded audio every 2 seconds or so to the recorded audio of a "pop" (i.e. if 70% or more of the byte[] audioData array is the same as that of a popping sound, then log the time). Can anyone with Android audio input experience let me know if I'm at least on the right track? This is not a question of me wanting you to code anything for me, but a question as to whether I'm on the correct track, and, if not, which direction I should head instead.</p>