@@ -0,0 +1,1516 @@
+%0Aimport android.media.MediaRecorder;%0Aimport android.support.annotation.NonNull;%0Aimport android.util.Log;%0A%0Aimport java.io.File;%0Aimport java.io.IOException;%0A%0A/**%0A * %E5%BD%95%E9%9F%B3(aac)%0A */%0Apublic class AudioRecordHelper %7B%0A%0A    private static final String LOG_TAG = %22AudioRecordHelper%22;%0A%0A    private static final int MAX_VU_SIZE = 100;%0A%0A    private File mFile;%0A%0A    private MediaRecorder mRecorder = null;%0A%0A    public AudioRecordHelper(@NonNull File file) %7B%0A        mFile = file;%0A    %7D%0A%0A    /**%0A     * %E5%BC%80%E5%A7%8B%E5%BD%95%E9%9F%B3%0A     */%0A    public void startRecording() %7B%0A        mRecorder = new MediaRecorder();%0A        mRecorder.setAudioSource(MediaRecorder.AudioSource.MIC);%0A        mRecorder.setOutputFile(mFile.getPath());%0A        mRecorder.setOutputFormat(MediaRecorder.OutputFormat.AAC_ADTS);%0A        mRecorder.setAudioEncoder(MediaRecorder.AudioEncoder.AAC);%0A%0A        try %7B%0A            mRecorder.prepare();%0A        %7D catch (IOException e) %7B%0A            Log.e(LOG_TAG, %22prepare() failed%22);%0A        %7D%0A%0A        mRecorder.start();%0A    %7D%0A%0A    /**%0A     * %E6%9A%82%E5%81%9C%E5%BD%95%E9%9F%B3%0A     */%0A    public synchronized void stopRecording() %7B%0A        if (mRecorder != null)%7B%0A            mRecorder.stop();%0A            mRecorder.release();%0A            mRecorder = null;%0A        %7D%0A    %7D%0A%0A    /**%0A     * %E8%8E%B7%E5%8F%96%E9%9F%B3%E9%87%8F%E7%AD%89%E7%BA%A7%EF%BC%880~100%EF%BC%89%0A     */%0A    public int getMaxVuSize()%7B%0A        if (mRecorder != null) %7B%0A            return MAX_VU_SIZE * mRecorder.getMaxAmplitude() / 32768;%0A        %7D%0A        return 0;%0A    %7D%0A%0A    /**%0A     * %E8%8E%B7%E5%8F%96%E9%9F%B3%E9%A2%91%E6%96%87%E4%BB%B6%0A     */%0A    public File getFile()%7B%0A        return mFile;%0A    %7D%0A%0A%7D%0A

add AudioRecordHelper