Nikhil
Nikhil

Reputation: 16196

Display Sound waves for Audio recording in Android

How can we display sound waves as displayed in below image..

When user speaks, The yellow bars will animate based on user's volume.

enter image description here

Please guide me.. Is there any reference link available? Is there any sample tutorial available?

Same Question in iPhone. but i wants to it in Android.

Upvotes: 9

Views: 3010

Answers (1)

Andrei Mankevich
Andrei Mankevich

Reputation: 2273

If you are using MediaRecorder for recording audio you can periodically request amplitude with MediaRecorder.getMaxAmplitude. Then you can create ClipDrawable from bars bitmap and use amplitude to set desired level.

Upvotes: 4

Related Questions