very poor quality of audio recorded on my droidx using MediaRecorder, why?

前端 未结 5 1888
予麋鹿
予麋鹿 2020-12-09 22:48

my project requires me to be able to record audio on an android device. i implemented solution using the MediaRecorder() but the recorded audio is in a terrible quality. wha

5条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-09 23:16

    Without hearing the audio, I can't tell much.

    There are methods on the MediaRecord object you can alter - Android MediaRecorder object

    void     setAudioEncoder(int audio_encoder)
        Sets the audio encoder to be used for recording.
    void     setAudioEncodingBitRate(int bitRate)
        Sets the audio encoding bit rate for recording.
    void     setAudioSamplingRate(int samplingRate)
        Sets the audio sampling rate for recording.
    

    Try changing those and see if any of the changes helps with the audio quality.

提交回复
热议问题