Microphone input
Posted
by George
on Stack Overflow
See other posts from Stack Overflow
or by George
Published on 2010-03-19T12:44:20Z
Indexed on
2010/03/19
13:21 UTC
Read the original article
Hit count: 207
android
I'm trying to build a gadget that detects pistol shots using Android. It's a part of a training aid for pistol shooters that tells how the shots are distributed in time and I use a HTC Tattoo for testing.
I use the MediaRecorder and its getMaxAmplitude method to get the highest amplitude during the last 1/100 s but it does not work as expected; speech gives me values from getMaxAmplitude in the range from 0 to about 25000 while the pistol shots (or shouting!) only reaches about 15000. With a sampling frequency of 8kHz there should be some samples with considerably high level.
Anyone who knows how these things work? Are there filters that are applied before registering the max amplitude. If so, is it hardware or software?
Thanks, /George
© Stack Overflow or respective owner