1

I can do it with command line : arecord -vv , but I need to finish it with code , I don't known which API can make it .

1 Answers1

0

arecord just looks at the captured samples (it uses the maximum in a certain interval).

You can do the same yourself. You also need to know what level a full-scale sample corresponds to.

Also see Detect silence when recording.

Community
  • 1
  • 1
CL.
  • 173,858
  • 17
  • 217
  • 259
  • Thanks a lot for helping !!! actually I can capture the audio stream but can't parse the level of volume from it . Or is there any API can get volume dB directly ? – George lucas Apr 10 '17 at 06:46