Android AudioRecord vs. MediaRecorder for recording audio

I want to record human voice on my Android phone. I noticed that Android has two classes to do this: AudioRecord and MediaRecorder. Can someone tell me what's the difference between the two and what are appropriate use cases for each?

I want to be able to analyse human speech in real-time to measure amplitude, etc. Am I correct in understanding that AudioRecord is better suited for this task?

I noticed on the official Android guide webpage for recording audio, they use MediaRecorder with no mention of AudioRecord.

86
задан stackoverflowuser2010 10 June 2016 в 17:55
поделиться