开发者

Current volume level of the Microphone input

开发者 https://www.devze.com 2023-02-07 14:22 出处:网络
In my app I am recording voice using the microphone. I want to be able to implement some sort of visual indicator of the current volume level of the sound being taken in by the microphone. For example

In my app I am recording voice using the microphone. I want to be able to implement some sort of visual indicator of the current volume level of the sound being taken in by the microphone. For example like in the Aud开发者_StackOverflow中文版io Recorder application for the iPhone which has a simulated analogue meter which moves to the right as the volume gets louder and to the left when the volume gets quieter.

How can I get the current level of volume? I am recording the audio using an AudioRecorder object.


You would have to set a Timer when the audio stream starts capturing and get the level of volume however frequently you wanted using getMaxAmplitude or getAudioSourceMax

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号