如何将媒体记录器转换为浮点数组

时间:2019-05-02 18:13:59

标签: java android record microphone mediarecorder

我有一个mediaRecorder对象,必须将其转换为一组实际值才能在C语言中运行一个函数。我可以做些什么工具或功能来获得此阵列吗?     谢谢!

//save the record on the device
private void startRecording() {
    mStartRecording = true;
    mRecorder = new MediaRecorder();
    mRecorder.setAudioSource(MediaRecorder.AudioSource.MIC);
    mRecorder.setOutputFormat(MediaRecorder.OutputFormat.THREE_GPP);
    mFileName = mPathNameenter code here + "/" + System.currentTimeMillis() + ".3gp";
    mRecorder.setOutputFile(mFileName);
    mRecorder.setAudioEncoder(MediaRecorder.AudioEncoder.AMR_NB);
    try {
        Log.e("", "prepare() succeed");
        mRecorder.prepare();
    } catch (IOException e) {
        Log.e("", "prepare() failed");
    }
    mRecorder.start();
}

0 个答案:

没有答案