I'm a newbie in programming and I wanna build a sound recording application.
I have this code which is recording sound and puts a timestamp :
I need to change it and make it messure the sound levels.I'll use the getMaxAmplitude method,but this method returns only the last result,before it was called.I think I should use a loop,but the start method is capturing and encoding continuously.
How can I get the current amplitude,for example in a period of 1 second,on my recording?
http://developer.android.com/reference/android/media/MediaRecorder.html#getMaxAmplitude() wrote:Returns the maximum absolute amplitude that was sampled since the last call to this method. Call this only after the setAudioSource().
the maximum absolute amplitude measured since the last call, or 0 when called for the first time