Android audio recording mediarecorder simple recording software implementation code
Steps to use the mediarecorder: 1. Create the mediarecorder object. 2. Call the setaudiosource() method of the mediarecorder object to set the source of the sound, which is generally passed into the mediarecorder.mic. 3. Call the setoutputformat() of the mediarecorder object to set the format of the recorded audio file. 4. Call the setaudiorncoder() of the mediarecorder object, setaudioencoding bitrate (int bitrate) Setaudiosamplingrate (int samplingrate) sets the encoding format, encoding bit rate, sampling rate, etc. of the recorded audio. 5. Call the setoutputfile (string path) method of the mediarecorder object to set the storage location of the recorded audio file. 6. Call the prepare() method of the mediarecoder object to prepare for recording. 7. Call the start() method of the mediarecoder object to start recording. 8 Call the stop () method of the mediarecoder object to stop recording, and call the release () method to release resources
example:
Source code download: http://xiazai.jb51.net/201401/yuanma/MediaRecorderTest (jb51.net).rar