Using MediaRecorder I capture sound from device’s microphone. From the sound I get I need only to analyze the sound volume (sound loudness), without saving the sound to a file.
Two questions:
- How do I get the loudness for the sound at a given moment in time?
- How do I do the analyze without saving the sound to a file?
Thank you.
Use
mRecorder.getMaxAmplitude();For the analysis of sound without saving all you need is use
mRecorder.setOutputFile("/dev/null");Here´s an example, I hope this helps