Reputation: 2356
I understand that the getMaxAmplitude function in MediaRecorder should return values from 0 to 32762 but in my phone Sont Z Ultra Google Play Edition i keep getting 9000 as the max value although shouting into the mic. When testing in my friends Nexus 5 I'm getting 32762 so I know it's not related to my code.
I need to know what is the max amplitude that can be produced in every phone that runs my app, how can I do that?
Thank you.
Upvotes: 0
Views: 1516
Reputation: 2356
Well after move testing I found out that changing this:
this.mediaRecorder.setAudioSource(
android.media.MediaRecorder.AudioSource.MIC
);
to this:
this.mediaRecorder.setAudioSource(
android.media.MediaRecorder.AudioSource.VOICE_COMMUNICATION
);
solves my problem. I get 32762 max amplitude in every device I tried it on.
Upvotes: 1