How to get the amplitude when blowing into MIC on android device

后端 未结 3 1380
刺人心
刺人心 2021-02-02 05:05

How to get the amplitude when blowing into MIC in android device.

MediaRecorder recorder = new MediaRecorder();
   recorder.setAudioSource(MediaRecorder.AudioSou         


        
3条回答
  •  独厮守ぢ
    2021-02-02 05:08

    You have to initialize the recorder, as well as set several methods. Look at the documentation for MediaRecorder to see how to do this. I've used this method and it works quite well.

提交回复
热议问题