我正在将音频文件写入外部存储器,但是立即上传该文件并将其删除。我希望能够直接获取音频数据并上传,而不必写入SD卡。
以下是我的当前代码:
以下是我的当前代码:
mRecorder = new MediaRecorder();
mRecorder.setAudioSource(MediaRecorder.AudioSource.MIC);
mRecorder.setOutputFormat(MediaRecorder.OutputFormat.THREE_GPP);
mRecorder.setOutputFile(Environment.getExternalStorageDirectory()
.getAbsolutePath() + "/filename.3gp");
mRecorder.setAudioEncoder(MediaRecorder.AudioEncoder.AMR_NB);
是否有替代我的setOutputFile
调用,以便写入某种类型的流?