如何在listview上显示我的sd卡录音?

时间:2014-09-14 10:59:53

标签: android android-listview audio-recording

我可以在SD卡上录制音频,但是,我希望在列表视图中列出记录;我的代码如下所示

private void beginRecording() throws IllegalStateException, IOException {
        ditchMediaRecorder();
        File outFile=new File(OUTPUT_FILE);

        if(outFile.exists())
            outFile.delete();

        recorder=new MediaRecorder();
        recorder.setAudioSource(MediaRecorder.AudioSource.MIC);
        recorder.setOutputFormat(MediaRecorder.OutputFormat.THREE_GPP);
        recorder.setAudioEncoder(MediaRecorder.AudioEncoder.AMR_NB);
        recorder.setOutputFile(OUTPUT_FILE);
        recorder.prepare();
        recorder.start();

0 个答案:

没有答案