getMaxAmplitude returns the maximum amplitude since the last call.
So, the first time you call it, it initializes itself (and so returns 0) a second time, it should return a different value. According to the documentation:
getMaxAmplitude() , . setAudioSource().
, , 0
, , , . galaxyTab 7 (Froyo), 10.1 (Honeycomb).
EDIT: (, ). , getMaxAmplitude, , start().
:
recorder.prepare();
recorder.getMaxAmplitude();
recorder.start();
int amplitude = recorder.getMaxAmplitude();
:
recorder.prepare();
recorder.start();
recorder.getMaxAmplitude();
int amplitude = recorder.getMaxAmplitude();
EDIT. - . , S2. 0. getMaxAmplitude() , , , , .